similar to: Mixing lty specifications in legend

Displaying 20 results from an estimated 2000 matches similar to: "Mixing lty specifications in legend"

2008 Sep 09
2
match problem by rownames
Hi all, While dat['a1',] and dat['a10',] produce the same results in the following example, I'd like dat['a1',] to return NAs. dat <- data.frame(x1 = paste(letters[1:5],10, sep=''), x2=rnorm(5)) rownames(dat) <- dat$x1 dat['a1',] dat['a10',] > sessionInfo() R version 2.7.2 (2008-08-25) i386-pc-mingw32 locale:
2008 Jun 09
1
Bug/Error in formatC? (Was: Why doesn't formatC( x, digits=2, format= "g")...)
Hi all After posting what follows, Duncan Murdoch suggested perhaps a bug in formatC, or an error on documentation. Any comments? In particular, bug, error or not, any ideas about how I can consistently get two significant figures to print? P. ---------- Original Message ---------- Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of
2008 Feb 27
2
Adding LaTeX cross-references into Sweave plots
Hi all I'm using Sweave and LaTeX, and love how they interact. But here's a different interaction I'm not sure how to achieve; I hope someone can help. I use a simple example, of course, to demonstrate. Suppose in my LaTeX document I have this: Here is a linear equation: \begin{equation} y = -1 + 3 x \label{EQ:example} \end{equation} This appears in the final product
2007 Jun 15
2
sma package, and MouseArray data set
Hi all I have just downloaded the sma package from CRAN. On installing on my linux machine, I get the message > library(sma) > data(MouseArray) Warning message: file 'MouseArray.RData' has magic number 'RDX1' Use of save versions prior to 2 is deprecated Hereafter, MouseArray is not found: > MouseArray Error: object "MouseArray" not found We were
2007 Mar 07
1
Sweave issue: quotes in verbatim-like output print incorrectly
Hi all I love Sweave; use it all the time. But I recently received a new computer, and ever since I have had a problem I've never seen before. For example, I place the following in my Snw file: <<>>= sms <- read.table("http://www.sci.usq.edu.au/staff/dunn/Datasets/applications/popular/smsspeed.dat", header=TRUE) attach(sms) sms.lm <- lm( Time ~ Age*Phone,
2007 Sep 13
1
Problem using xtable on an array
Hi all I know about producing a minimal example to show my problem. But I'm having trouble producing a minimal example that displays this behaviour, so please bear with me to begin with. Observe: I create an array called model.mat. Some details on this: > str(model.mat) num [1:18, 1:4] -0.170 -0.304 -2.617 2.025 -1.610 ... - attr(*, "dimnames")=List of 2 ..$ : chr
2007 May 03
2
Building package: What does this message about rcompgen imply?
Hi all I'm updating a package for submission to CRAN, and I am getting an error message I never have seen before, and can't find out what it implies or means (and hence, what I need to do to fix it). After running R CMD check, I get this: <snip> * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd
2008 Jun 06
2
Why doesn't formatC( x, digits=2, format="g") doesn't always give 2 sig figs?
Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of reals to a given number of significant digits. Can someone please explain this to me? These first three give what I expect on reading ?formatC: > formatC(0.0059999, digits=2,format="fg",flag="#") [1] "0.0060" > formatC(0.59999,
2006 Nov 07
0
rbind with auto-row-named data.frame + list (PR#9346)
There's a problem new to R2.4.0 when rbinding an auto-row-named data.frame to a list: > rbind( data.frame( x=1), list( x=2)) Error in attr(value, "row.names") <- rlabs : row names must be 'character' or 'integer', not 'double' Works OK with 2 data.frames or 2 lists. Mark Bravington CSIRO Mathematical & Information Sciences Marine
2003 Jul 29
1
Sweave: pass scale parameter to includegraphics?
Hi all I'm using Sweave and find it a treat. But one question: I use Sweave to create my pictures which are automatically included into LaTeX. For example, in the file test.Snw, I may have: % LaTeX stuff \begin{figure} <<fig=true,width=5,height=5>>= x1 <- seq(1,5, length=10) x2 <- sin(x1) plot(x1,x2) @ \caption{Plot} \end{figure} % More LaTeX This produces the LaTeX
2003 Mar 21
1
The best way to end up with TIFF {Was: end up with WMF)
Hi all I posted a couple of days ago about how to end up with wmf files eventually in R for linux. The short answer was: you (probably) can't...and don't! The journal in question also accepts TIFF files, I am told (it's a physiology journal). So I adjust my question: What is the best way to get TIFF files out of R? It can't create them directly as far as I can tell.
2004 Mar 29
1
White background in PS pictures
Hi all I am using R to produce postscript pictures via the postscript command. I have never had any problems... until now, when I want to inlcude my .ps file is a LaTeX document *without* a white background. (If it's important, I'm using the prosper class with the whitecross option, so the background in blue.) I would like my .ps file to have a white background. If I read the help
2004 Nov 11
1
substitute/paste question for using Greek in plot titles
Hi all I am having troubles making sense of why code (1) below fails but code (2) below works. Code (1): > phi.1 <- 1 > plot(0 ~ 0, + main=substitute(paste("A vaue for ",phi," = ",phival), list(phival=phi.1)) ) Error in paste("The two deviances for ", phi, " = ", 2) : Object "phi" not found But this works: Code (2): >
2003 Apr 02
2
Two questions
Hi all Two questions: 1. I note that help for the postscript device claims "The postscript produced by R is EPS (Encapsulated PostScript) compatible...". It does not say it is EPS *compliant*. Indeed, the EPS produced by R includes a \showpage command which I believe (not that I'm an expert!) non-standard EPS. My question: Is there any reason why it is EPS compatible, but
2006 Dec 22
5
substitute creates an object which prints incorrectly (PR#9427)
The function "substitute" seems to fail to make a genuine substitution, although the printed verision seems fine. Here is an example. > m <- substitute(Y <- function(x) FUN(x+1), + list(Y = as.name("y"), FUN = as.name("sin"))) > m y <- function(x) sin(x + 1) > eval(m) > y function(x) FUN(x+1) However the story doesn't end there. The
2003 Jul 28
1
Plotting (mixed) line types and legends
Hi all I have a question about plotting line types and legends. Here's a short piece of code to demonstrate: x <- y <- seq(1,10) plot(x,y, type ="l", lty="33") lines(x,y+1, lty=1) legend( 8,2,legend=c("lty=1","lty=\"33\""), lty=c(1,"33") ) On my system (see below), the line types in the legend are not the same as in the
2004 Jun 22
1
Using xtable with summaries of lm objects
Hi all Suppose I do the following: set.seed(1000) library(xtable) x <- runif( 10 ) y <- 1 + 2*x + rnorm( length(x) ) test.lm <- lm( y ~ x ) summary( test.lm ) xtable ( summary( test.lm ) ) The final xtable output follows: % latex table generated in R 1.8.1 by xtable 1.2-2 package % Tue Jun 22 09:56:36 2004 \begin{table}[ht] \begin{center} \begin{tabular}{rrrrr} \hline &
2002 Dec 13
1
Loading libraries: Nas introduced
Hi all, I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. When I try to attach the library using, eg > library( libname, lib.loc=path.to.library) I get this message: Warning message: NAs introduced by
2003 Mar 19
3
The best way to end up with WMF files
Hi all I am doing some stats work for a group of biologists who require windows metafiles (*.wmf) for their publications. To create these, I appear to have two choices: 1. Restart my machine in Windows and use savePlot 2. Keep my machine in linux, save as another format, then convert. I'd rather stay in linux; but how do I get wmf files? I looked at using ImageMagick's convert,
2002 Dec 16
1
Creating libraries: Cannot make help
Hi all I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. I also posted a few days ago and thanks to Peter Dalgaard I have managed to focus my search for errors. I am trying to create a library in R. I run the