Re: [R] incorrect multiple outputs

2009-12-11 Thread Richard Thompson
is called by a perl script, >> which creates "input_file.txt" by inserting 288 lines of (reformatted) data >> for each data file in the directory. So the Rscript will (and is doing) run >> the loop a number of times equal to the number of files the perl script read

Re: [R] incorrect multiple outputs

2009-12-11 Thread Richard Thompson
lem is that it should only create the data.frame and write to > the file after the last iteration, but it's (creating and)writing the > complete data.frame every iteration. > > Sent using BlackBerry® from Orange > > > > -Original Message- > > From: ji

Re: [R] incorrect multiple outputs

2009-12-11 Thread Ista Zahn
e after the last iteration, but it's (creating and)writing the complete > data.frame every iteration. > Sent using BlackBerry® from Orange > > -Original Message- > From: jim holtman > Date: Thu, 10 Dec 2009 18:00:54 > To: biscuit > Cc: > Subject: Re: [R]

Re: [R] incorrect multiple outputs

2009-12-10 Thread bawan03
n Date: Thu, 10 Dec 2009 18:00:54 To: biscuit Cc: Subject: Re: [R] incorrect multiple outputs If I rad you code right, file.rows is equal to 1 and your 'for' loop will only iterate once. Is that what you were expecting? No reproducible code provided, so that is my best guess.

Re: [R] incorrect multiple outputs

2009-12-10 Thread jim holtman
If I rad you code right, file.rows is equal to 1 and your 'for' loop will only iterate once. Is that what you were expecting? No reproducible code provided, so that is my best guess. >file.rows<- c(nrow(file)/288) # "input_file.txt" contains 288 reformatted lines for each original data file ...

[R] incorrect multiple outputs

2009-12-10 Thread biscuit
HI, I'm having trouble with a piece of Rscript which keeps outputting incorrectly. it's something like this: the code reads in from a file which contains (reformated) input >file<-read.table(file="input_file.txt",sep="\t")[,c(1,3:5)] > >file.rows<- c(nrow(file)/288) # "input_file.txt" contains