Re: [R] Getting graphs into LaTeX

2002-12-20 Thread Andrew Criswell
Thanks to all who responded to my inquiry. Bingo, it works! I revised the code as follows and it works fine: For the R code: ___ pdf() pdf('lecture00-graph-01.pdf', horizontal = FALSE, height = 6, pointsize = 10) hist(trial.outcome.5, break

Re: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Thomas Lumley
On Fri, 20 Dec 2002, Saikat Debroy wrote: > I have no idea what you mean by binary/text SAS XPORT formats. R > implements the XPORT format as described in > http://ftp.sas.com/techsup/download/technote/ts140.html > and that definitely is not a text format. > Quoth http://www.nber.org/data/sa

Re: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Saikat Debroy
> "Stephen" == Stephen Arthur <[EMAIL PROTECTED]> writes: Stephen> The SAS data set I PROC CPORTed is [9] the result is [10]. Stephen> I PROC CIMPORTed [10] back to its orginal state [9], and it Stephen> worked. Stephen> So the SAS people think that the error is not with the SAS Ste

Re: [R] Sweave & xtable

2002-12-20 Thread A.J. Rossini
> "hedderik" == Hedderik van Rijn <[EMAIL PROTECTED]> writes: hedderik> I'm trying to get Sweave running for automatic report generation, and hedderik> it seems to run fine when just using verbatim output. However, I've hedderik> ran into a problem with xtable. I would like to prin

Re: [R] JAVA and R

2002-12-20 Thread A.J. Rossini
> "ngayee" == Ngayee J Law writes: ngayee> Is it possible to call R in JAVA? Thanks! Yes. -- A.J. RossiniRsrch. Asst. Prof. of Biostatistics U. of Washington Biostatistics [EMAIL PROTECTED] FHCRC/SCHARP/HIV Vaccine Trials Net [EMAIL PROT

[R] new optimized BLAS

2002-12-20 Thread Liaw, Andy
Dear R-help, Here's a posting to the most recent NA-digest: From: Robert van de Geijn <[EMAIL PROTECTED]> Date: Fri, 13 Dec 2002 11:15:23 -0600 Subject: Fast BLAS Libraries for Current Architectures Recent research by Kazushige Goto, Visiting Scientist at UT-Austin, has resulted in high-performa

[R] Newbie - referencing and vectorization questions

2002-12-20 Thread Debruicker, Paul A
Dear List, I am working on learning R and have come up with a few questions that I haven't been able to answer with books from the local library. I am attempting to find the mean and variance of subsets of a ~140k item vector(lets say variable X). Using groups of 5 variables from a pool of

Re: [R] lower triangle

2002-12-20 Thread Douglas Bates
"Wilkinson, Mark" <[EMAIL PROTECTED]> writes: > I want to compute the lower triangle of a square matrix (optionally, sans > diagonal). With for() loops I can do something like this: > > ## 5 by 5 matrix rtn > for (j in 1:5) { > for (k in 1:j) { > if (j != k) { ## optional >

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Stephen Arthur
Thomas, The SAS data set I PROC CPORTed is [9] the result is [10]. I PROC CIMPORTed [10] back to its orginal state [9], and it worked. So the SAS people think that the error is not with the SAS XPORT file, but with R trying to load a text SAS XPORT file, when it should be loading the SAS XPORT

[R] Sweave & xtable

2002-12-20 Thread Hedderik van Rijn
I'm trying to get Sweave running for automatic report generation, and it seems to run fine when just using verbatim output. However, I've ran into a problem with xtable. I would like to print the following matrix using xtable: > dim(counts) [1] 19 15 All columns are filled with real/integer n

[R] JAVA and R

2002-12-20 Thread Ngayee J Law
Hello everyone, Is it possible to call R in JAVA? Thanks! Jacqueline __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] lower triangle

2002-12-20 Thread Wilkinson, Mark
Hi, I want to compute the lower triangle of a square matrix (optionally, sans diagonal). With for() loops I can do something like this: ## 5 by 5 matrix rtn for (j in 1:5) { for (k in 1:j) { if (j != k) { ## optional rtn[j, k] <- my.func(j, k)

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Thomas Lumley
On Fri, 20 Dec 2002, Stephen Arthur wrote: > Thomas, > > Your point is well taken. I spoke with the people at > SAS again, and they said that a reason why I was > having a problem with the SAS xpt file, is that my > variable names are sometimes longer than 8 characters > long. > > PROC COPY puts

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Stephen Arthur
Thomas, Your point is well taken. I spoke with the people at SAS again, and they said that a reason why I was having a problem with the SAS xpt file, is that my variable names are sometimes longer than 8 characters long. PROC COPY puts a limit of 8 characters length to variable names. Does R ha

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Thomas Lumley
On Fri, 20 Dec 2002, Stephen Arthur wrote: > Thanks > > > library(foreign) > > I did do that originally, I just mis-tpyed it, and it > did not work. > > I talked with people at SAS, and they said the PROC > COPY SAS code was good, but that I just need to play > around with the R parameters for rea

Re: [R] GetRNGstate() crashes with 'Segmentation fault'

2002-12-20 Thread ripley
On Fri, 20 Dec 2002, Timur Elzhov wrote: > On Fri, Dec 20, 2002 at 04:56:31PM +, [EMAIL PROTECTED] wrote: > > > > ~> ./a > > > Segmentation fault > > Whyever do you think that should work? > > > > If you want to link against libR.so and call into R, you do need to > > initialize R, and you hav

Re: [R] GetRNGstate() crashes with 'Segmentation fault'

2002-12-20 Thread Timur Elzhov
On Fri, Dec 20, 2002 at 04:56:31PM +, [EMAIL PROTECTED] wrote: > > ~> ./a > > Segmentation fault > Whyever do you think that should work? > > If you want to link against libR.so and call into R, you do need to > initialize R, and you have not done so. > > I also don't see that the program ha

Re: [R] GetRNGstate() crashes with 'Segmentation fault'

2002-12-20 Thread ripley
Whyever do you think that should work? If you want to link against libR.so and call into R, you do need to initialize R, and you have not done so. I also don't see that the program has any use. The complicated ways to manipulate the random number generator are really only of any use from R code

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Stephen Arthur
Thanks > library(foreign) I did do that originally, I just mis-tpyed it, and it did not work. I talked with people at SAS, and they said the PROC COPY SAS code was good, but that I just need to play around with the R parameters for read.ssd Will get back to you on this issue. If you have any a

RE: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)

2002-12-20 Thread Pfaff, Bernhard
try: library(foreign) read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use") instead, hth, Merry Christmas, Bernhard -Original Message- From: Stephen Arthur [mailto:[EMAIL PROTECTED]] Sent: 20 December 2002 16:55 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PRO

[R] GetRNGstate() crashes with 'Segmentation fault'

2002-12-20 Thread Timur Elzhov
Dear R-masters, I tried to compile this simpel C-code: //- #include int main() { GetRNGstate(); return 0; } //- Compiling: ~> gcc -o a a.c -I/usr/lib/R/include/ -L/usr/lib/R/bin/ -lR ~> ldd a libR.so => /usr/lib/libR.so (0x40018000)

Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS dataset into an R data frame)

2002-12-20 Thread Stephen Arthur
Hello, I adopted the suggestion to use the R command > foreign before the > read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use") statement (notice, I am at work now, so the directory structure changes). Do I need any of the other read.ssd parameters to get this statemen

Re: [R] Re: R News Volume 2/3

2002-12-20 Thread Douglas Bates
For those who prefer to click their way to RNews, the PDF file is http://cran.R-project.org/doc/Rnews/Rnews_2002-3.pdf and the gzip'd PostScript file is http://cran.R-project.org/doc/Rnews/Rnews_2002-3.ps.gz In North America please use http://cran.us.R-project.org/doc/Rnew

Re: [R] stack on factors

2002-12-20 Thread Douglas Bates
[EMAIL PROTECTED] writes: > It seems that stack() does not include factors. Any easy way of "stacking" > factors in a dataframe without recoding to numbers? You may want to try reshape(..., direction = 'long') instead of stack. __ [EMAIL PROTECTED] mai

RE: [R] Printing correlation matrices (lm/glm)

2002-12-20 Thread Thomas Lumley
On Fri, 20 Dec 2002 [EMAIL PROTECTED] wrote: > Hi Andy! > Thanks for the reply. It gives the clue: in fact it should be > > print(summary(lm2, corr=TRUE), symbolic.cor=FALSE) > > (not "symbolic.corr"). However, this raises a further mystery! > > I had spent ages with "?" and "help.search" (e.g.

Re: [R] Getting graphs into LaTeX

2002-12-20 Thread Peter Malewski
On Thu, Aug 21, 2003 at 08:17:05PM +0700, Andrew Criswell wrote: > Which I try to compile with the command: pdflatex trix.tex > > But then, I get this error: > > ! LaTeX Error: Unknown graphics extension: .eps.

[R] Memory Leak in 1.6.0

2002-12-20 Thread apollo wong
Thanks Folks, the 1.6.1 did fix this problem __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] n-dim quasi random number generator

2002-12-20 Thread apollo wong
Hi, Does anyone know that if there is R-code available for a n-dim quasi random number generator, n>500. Thanks. Apollo Wong __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

RE: [R] Cross-correlograms or cross-variograms in R?

2002-12-20 Thread Jens Nieschulze
On Fri, 20 Dec 2002, Rene Eschen wrote: % % %> The library "spatial" included as a default library in the base package %could help you. %I did find the option to calculate correlograms and variograms, but not %_cross_variograms and _cross_correlograms. Are those in this package and if %so, what is

RE: [R] Cross-correlograms or cross-variograms in R?

2002-12-20 Thread Rene Eschen
> The library "spatial" included as a default library in the base package could help you. I did find the option to calculate correlograms and variograms, but not _cross_variograms and _cross_correlograms. Are those in this package and if so, what is the command? Regards, René Eschen. > For my

Re: [R] Help on R commands

2002-12-20 Thread Ben Bolker
You're not too far off. You need to do something like objfun <- function(p) { mu <- p[1] sigma <- p[2] -sum(dnorm(x,mean=mu,sd=sigma,log=TRUE)) } optim(par=c(0,1),fn=objfun) # check ?optim for correct argument names Some points: - the main thing is that you have to define mu and si

[R] Summary: vectorizing test for equality

2002-12-20 Thread John Miyamoto
Thanks for many prompt and useful comments. The question was: if x is the vector > x <- c( 2, NA, 1, 5, 3) > x [1] 2 NA 1 5 3 Then x == 5 yields > x == 5 [1] FALSENA FALSE TRUE FALSE whereas what I want is FALSE FALSE FALSE TRUE FALSE #-- Matthew Dowle sent a simple

[R] Re: R News Volume 2/3

2002-12-20 Thread Dr Eberhard W. Lisse
In message <[EMAIL PROTECTED]>, Friedrich.Leisch@univie .ac.at writes: > > Just in time to provide you with reading material for the holidays we > have published the 2002/3 issue of R News on > > http://cran.R-project.org/doc/Rnews Friedrich, would it perhaps be possible to post the com

RE: [R] Printing correlation matrices (lm/glm)

2002-12-20 Thread Ted Harding
On 20-Dec-02 Ted Harding wrote: > I had spent ages with "?" and "help.search" (e.g. "summary.lm", > "summaru.glm", "summary", "print", "symbolic", "corr" ... ) trying > to find something relevant, with no success. Following your mail, I > grepped right down /usr/lib/R, first for "symbolic.corr" (wi

[R] R News Volume 2/3

2002-12-20 Thread Friedrich . Leisch
Just in time to provide you with reading material for the holidays we have published the 2002/3 issue of R News on http://cran.R-project.org/doc/Rnews where you can download the newsletter as PDF or Postscript file. It will propagate to the CRAN mirrors within a day or two. This issue s

RE: [R] Printing correlation matrices (lm/glm)

2002-12-20 Thread Ted Harding
Hi Andy! Thanks for the reply. It gives the clue: in fact it should be print(summary(lm2, corr=TRUE), symbolic.cor=FALSE) (not "symbolic.corr"). However, this raises a further mystery! I had spent ages with "?" and "help.search" (e.g. "summary.lm", "summaru.glm", "summary", "print", "symbolic"

RE [R] workspace vs. image

2002-12-20 Thread Cliff Lunneborg
As an alternative to the use of multiple shortcus to gain entry to different R environments on WIndows platforms I would like to suggest the use of two R functions written by my colleague John Miyamoto. I have taken the liberty of attaching their definitions to this message. Their efficient use is

Re: [R] vectorizing test for equality

2002-12-20 Thread Eric Lecoutre
Take a look at 'any', which allows to remove missing values before test: any(y==3, na.rm=TRUE) If your vector does not contain integers, dont forget to change 'y==3' test by something more appropriate. (begin to round with a fixed number of dec. for exemple). Eric At 00:15 20/12/2002 -0800,

Re: [R] vectorizing test for equality

2002-12-20 Thread ripley
> x <- c( 2, NA, 1, 5, 3) > x %in% 5 [1] FALSE FALSE FALSE TRUE FALSE Knowledge like this is covered in chapter 2 of MASS4 (Venables & Ripley, 2002). Note that your subject is misleading: == does test for equality, but that is not what you actually wanted. On Fri, 20 Dec 2002, John Miyamoto wr

[R] vectorizing test for equality

2002-12-20 Thread John Miyamoto
Dear R Help, I am trying to create a boolean vector that is TRUE whenever a particular value occurs in a numeric vector, and FALSE otherwise. For example, suppose that > y <- c(5, 2, 4, 3, 1) > y [1] 5 2 4 3 1 and suppose that I want to find where 3 occurs in y. Then, the following yields th