Ah, I didn't know this! Thanks Ben.
On Fri, Feb 8, 2013 at 10:18 AM, Ben Tupper wrote:
> Hi,
>
> On Feb 8, 2013, at 9:40 AM, Brian Smith wrote:
>
> > Hi,
> >
> > I am trying to append tables on file with this sample code:
> >
> >for(i in 1:2){
> >mat <- data.frame(sample(1:30
Hi,
On Feb 8, 2013, at 9:40 AM, Brian Smith wrote:
> Hi,
>
> I am trying to append tables on file with this sample code:
>
>for(i in 1:2){
>mat <- data.frame(sample(1:30,9),3,3)
>colnames(mat) <- letters[1:3]
>ifelse(i ==
> 1,write.table(mat,paste('te
Thanks Louis! That seems to work!
On Fri, Feb 8, 2013 at 10:06 AM, Louis Aslett wrote:
> I believe your problem stems from using ifelse() actually ... it
> requires the statements which it runs to return a value with the same
> shape as the test, which write.table() isn't doing.
>
> Just change i
I believe your problem stems from using ifelse() actually ... it
requires the statements which it runs to return a value with the same
shape as the test, which write.table() isn't doing.
Just change it to a regular if with an else and you'll be fine:
for(i in 1:2){
mat <- data.frame(sample(1:30
4 matches
Mail list logo