Re: [Rd] How to test if R is running on a Mac

2007-09-20 Thread Hin-Tak Leung
Prof Ripley had already spoken with a better solution (Sys.info())... The problem with system("uname") is that it depends on shell behavior and also the availability of an external utility - 'uname' - i.e. although it would work as intended on mac OS X, it would die on windows due to not having

Re: [Rd] suggestion for read.table

2007-09-20 Thread Benjamin Tyner
Correction: the warning would be triggered by warning("cols = ", cols, " != length(data) = ", length(data), domain = NA) Ben On 9/20/07, Benjamin Tyner <[EMAIL PROTECTED]> wrote: > R-devel, > > IMHO, in readtable.R, the scan command > > > if (nlines > 1) > for (i in seq_along(col)) >

[Rd] suggestion for read.table

2007-09-20 Thread Benjamin Tyner
R-devel, IMHO, in readtable.R, the scan command if (nlines > 1) for (i in seq_along(col)) col[i] <- length(scan(file, what = "", sep = sep, quote = quote, nlines = 1, quiet = TRUE, skip = 0,

Re: [Rd] Locale problems with too-fancy quotes in Windows CMD.exe

2007-09-20 Thread Martin Morgan
Yes, sorry about the divination. FWIW I've seen another report of this (in passing, while addressing another issue) on the Bioconductor mailing list, and suspect that US users (and others?) will frequently be perplexed, perhaps spending significant time trying to track down how the 'wrong' data got

Re: [Rd] Locale problems with too-fancy quotes in Windows CMD.exe

2007-09-20 Thread Prof Brian Ripley
On Thu, 20 Sep 2007, Martin Morgan wrote: 'Fancy' quotes are displayed incorrectly when running R from Windows' CMD shell (Start -> Run -> CMD; latin small letter ae and capital letter AE; as a script or interactively)). Is this a system configuration issue, and if so how can I correct it? Yes

Re: [Rd] copying promise

2007-09-20 Thread Thomas Friedrichsmeier
Hi, On Thursday 20 September 2007, Gabor Grothendieck wrote: > 1. Is there some way to copy a promise so that the copy has the same > expression in its promise as the original. As far as I am aware (which is not very far at all), there is no way to do this in R code. However, it's fairly simple

[Rd] Locale problems with too-fancy quotes in Windows CMD.exe

2007-09-20 Thread Martin Morgan
'Fancy' quotes are displayed incorrectly when running R from Windows' CMD shell (Start -> Run -> CMD; latin small letter ae and capital letter AE; as a script or interactively)). Is this a system configuration issue, and if so how can I correct it? C:\R>Rscript -e sQuote('x') [1] "æxÆ" C:\R>R --v

[Rd] aperm doesn't copy attributes

2007-09-20 Thread Liaw, Andy
In the "Value" section of ?aperm, I see: `... In each case other attributes are copied from a.' However: R> f <- factor(sample(letters[1:2], 10, replace=TRUE)) R> dim(f) <- c(5, 2) R> t(f) [,1] [,2] [,3] [,4] [,5] [1,] aabbb [2,] aabaa Levels: a b R> ap

Re: [Rd] How to test if R is running on a Mac

2007-09-20 Thread Keith Satterley
I use Sys.info()["sysname"]. It returns "Darwin" on a Mac, "Windows" on MS Windows and "Linux" on my Linux box. Is this sufficient for your needs, I'm using R-2.6.0alpha on MS Windows and 2.5.0 on Mac and Linux at the moment. cheers, Keith Satterley Bioinformatics Division The Walter and Eliza

Re: [Rd] How to test if R is running on a Mac

2007-09-20 Thread Prof Brian Ripley
On Thu, 20 Sep 2007, stefano iacus wrote: > what about > > > system("uname") > Darwin Why not use Sys.info() or R.version to find that? > stefano > p.s. if one day R will run on the iPhone, you have to change the > question below into "Do you see an apple logo somewhere on your > device?") And

Re: [Rd] How to test if R is running on a Mac

2007-09-20 Thread stefano iacus
what about > system("uname") Darwin stefano p.s. if one day R will run on the iPhone, you have to change the question below into "Do you see an apple logo somewhere on your device?") On 20/set/07, at 00:37, Hin-Tak Leung wrote: > On linux boxes, >version$os and R.version$os > is 'linux