[R] ifelse on data frames

2007-01-04 Thread maj
[Using R 2.2.0 on Windows XP; OK, OK, I will update soon!] I have noticed some undesirable behaviour when applying ifelse to a data frame. Here is my code: A - scan() 1.00 0.00 0.00 0 0.0 0.027702 0.972045 0.000253 0 0.0 A - matrix(A,nrow=2,ncol=5,byrow=T) A == 0

Re: [R] Extracting R plots from MS Word

2006-06-30 Thread maj
Just a note to say what I did. I think that the results were OK but I have yet to hear from the journal. 1. I saved the Word document under another name. 2. I deleted all the contents of the document except the target graphic. 3. I printed to file yielding a .prn file. 4. I changed the extension

[R] Extracting R plots from MS Word

2006-06-29 Thread maj
Hi, I am revising a paper that I am a co-author of. The figures are plots generated from R but at the moment I do not have the R code that generates them. As this is time critical I would like to slightly abuse the list by asking whether anyone knows how to extract from MS Word into a

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread maj
Thanks to all those who responded to my request about extracting R plots from MS Word. I decided to try Gabor Grothendieck's second suggestion and saved the Word document as html. (I may yet try some of the other suggestions.) Saving the .doc as .htm indeed produced a folder with many of the

[R] Bootstrap ICC estimate with nested data

2004-09-21 Thread Bliese, Paul D MAJ USAMH
I would appreciate some thoughts on using the bootstrap functions in the library bootstrap to estimate confidence intervals of ICC values calculated in lme. In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance the ICC in the following example is 0.116:

[R] Listing subsets

2004-08-01 Thread maj
How best may I form a list containing all choose(n,k) k-element subsets of a vector x of length n? (and for subsequences?) Murray Jorgensen __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Fatal Error: INVALID HOMEDRIVE

2004-04-23 Thread Vinyard Maj William C
As requested: set eviron.txt ALLUSERSPROFILE=D:\Documents and Settings\All Users APPDATA=D:\Documents and Settings\vinyardwc\Application Data CMP_HOME=C:\PROGRA~1\DIICOE~1 CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=MATCOM08WK072 ComSpec=C:\WINNT\system32\cmd.exe HOMEDRIVE=C:

RE: [R] Fatal Error: INVALID HOMEDRIVE

2004-04-23 Thread Vinyard Maj William C
have you tried changing the Target line in the properties dialog for the icon to this: C:\Program Files\R\rw1090\bin\Rgui.exe HOMEPATH=\path\to\normal\R\workdir -Original Message- From: Brett Melbourne [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 13:13 To: Vinyard Maj William

[R] Error with 1.9.0 - Invalid HOMEDRIVE

2004-04-23 Thread Vinyard Maj William C
Prior to running R: echo %HOMEDRIVE% C: # HOMEDRIVE variable set echo %HOMEPATH% %HOMEPATH% # HOMEPATH variable not set Rgui HOMEPATH=\ # starts R-1.9.0...works fine After running R: echo %HOMEPATH% %HOMEPATH% # HOMEPATH variable still not set I've tried setting

[R] Fatal Error: Invalid HOMEDRIVE

2004-04-22 Thread Vinyard Maj William C
All, I've encountered the same problem as others who have posted under the same subject. I've had R-1.8.1 installed and running since it was released. Yesterday morning when I tried to start Rgui.exe I got the subject error message. Since I live at the whim of the network administrators I can

Re: [R] model-based clustering

2004-01-14 Thread maj
The list could probably be more useful if you gave more details about your data and the problem. I have written a bit of R code myself for fitting a finite mixture of univariate Poissons by EM and found it very simple to program in R. I suspect that your problem is multivariate, but that should

RE: [R] Using files as connections

2003-08-29 Thread maj
I nearly forgot to thank Andy Liaw and Tony Plate for their help with this problem. BTW Andy's method does run faster than the natural fix-up of my original code. Murray Jorgensen You are using the connection the wrong way. You need to do something like: fcon - file(c:/data/perry/data.csv,

[R] Using files as connections

2003-08-28 Thread maj
I have been trying to read a random sample of lines from a file into a data frame using readLines(). The help indicates that readLines() will start from the current line if the connection is open, but presented with a closed connection it will open it, start from the beginning, and close it when

[R] lm, gee and lme

2003-03-03 Thread Bliese, Paul D MAJ WRAIR-Wash DC
versus too large SE values Paul MAJ Paul Bliese, Ph.D. Walter Reed Army Institute of Research Phone: (301) 319-9873 Fax: (301) 319-9484 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] matrix subscripts in replacement

2003-02-01 Thread Bliese, Paul D MAJ WRAIR-Wash DC
I'm reluctant to draw the S-PLUS and R comparison (these are different programs after all), but could someone tell me why the following matrix substitution works in S-PLUS, but not R. I'm curious because matrix substitution is a really slick way to cleaning up columns of data in data frames. For