[R] Psedocode in R

2013-09-21 Thread John S.
I have never written my own function, psedocode, in R. Can anyone show me how to write a psedocode if I want to return, say, like mode or class...? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.eth

[R] Reading a file with random whitespace

2012-04-19 Thread John S
Dear R-users, I have a large data file that I am trying to read in R where the file has a white space at the begging and at random places. The whitespace is actually NA so I am trying to read the file using scan but with no success!! Please help Here are some example rows from the data file.

Re: [R] Saving multiple plots using tiff function

2012-04-13 Thread John S
Thanks Uwe, I am gald to hear there is a fix ! Any chance you could let me knwo if it worked ? 2012/4/12 Uwe Ligges > > > On 12.04.2012 13:53, Uwe Ligges wrote: > >> >> >> On 12.04.2012 13:49, John S wrote: >> >>> Thanks Berend for your answer!

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread John S
Thanks Berend for your answer! I read the documentation but I don’t understand filename ="Rplot%03d.tif" ? Do you mind sending me what you tried? On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselman wrote: > > On 12-04-2012, at 13:07, John S wrote: > > > Dear R users

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread John S
50,padj=2,col="black",cex=1) dev.off() Your help is appreciated, John On Fri, Apr 6, 2012 at 2:26 PM, John S wrote: > Sorry forgot to mention that I am using windows 7 and R session info > > R version 2.15.0 (2012-03-30) > Platform: i386-pc-mingw32/i386 (32-bit > >

Re: [R] Saving multiple plots using tiff function

2012-04-06 Thread John S
Sorry forgot to mention that I am using windows 7 and R session info R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit Thanks, John On Fri, Apr 6, 2012 at 2:17 PM, John S wrote: > Dear R experts, > > I am trying to save three plots using tiff graphics devices; ho

[R] Saving multiple plots using tiff function

2012-04-06 Thread John S
Dear R experts, I am trying to save three plots using tiff graphics devices; however the following code only produces two files (Rplot002.tif and Rplot003.tif) showing figures 1 and 3. Here is a simplified ex code tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300, pointsize=1

[R] Plotting device does not show all graphs

2011-05-26 Thread John S
Dear All, I am creating 4 plots (files) but I could see only 3. Here is a simple code d=data.frame(age=rnorm(100,40,8),ht=rnorm(100,170,15)) tiff(file=paste("test","%03d",".tif",sep="")) hist.data.frame(d) datadensity(d) par(mfrow=c(1,2),mar=c(3,3,3,3)) boxplot(d$age) hist(age) dev.off()

Re: [R] Saving multiple 3x3 TIFF graphics inside a loop

2011-05-10 Thread John S
quot;)} } dev.off() My workaround around was to break the dataset into small data each with 9 subjects but if I change the mfrow then I have to change no. of subjects. Any smart suggestion to get around this? I tried to open and close devices based on iterations (i) but it does not work for me

[R] Saving multiple 3x3 TIFF graphics inside a loop

2011-05-09 Thread John S
Dear Friends, I have been trying to save multiple 3x3 (mfrow=c(3,3) graphics inside a loop using tiff figure format (not using PDF or savePlot functions) with no success. Could you please help? Here is a simplified example code: dat=data.frame (ID=rep(1:10,each=10),IDV=rep(seq(1:10),times=10))