write.table( rbind( quarter=names(maxr), maxr ), ..., col.names=FALSE, ... )
James Rome wrote:
>
> In my code, I calculate the maximum values with 2 factors using
> maxr=with(arrdf, tapply(rate,list(weekday,quarter), max, na.rm=T))
>
> and I want to write out the file so that Excel can read it
Yes, that worked.
Thank you,
Jim
On 2/2/10 3:45 PM, jim holtman wrote:
> Use 'write.csv'
>
> write.csv(maxr,fname,na="0")
>
> this may work better.
>
>
>> write.table(x.df,sep=',')
>>
> "V1","V2","V3"
> "1",1,4,7
> "2",2,5,8
> "3",3,6,9
>
>> write.csv(x.df)
>>
> "","V1","V2","V3"
Use 'write.csv'
write.csv(maxr,fname,na="0")
this may work better.
> write.table(x.df,sep=',')
"V1","V2","V3"
"1",1,4,7
"2",2,5,8
"3",3,6,9
> write.csv(x.df)
"","V1","V2","V3"
"1",1,4,7
"2",2,5,8
"3",3,6,9
write.csv makes it excel compatible.
On Tue, Feb 2, 2010 at 3:32 PM, James Rome wrote:
In my code, I calculate the maximum values with 2 factors using
maxr=with(arrdf, tapply(rate,list(weekday,quarter), max, na.rm=T))
and I want to write out the file so that Excel can read it.
I used
write.table(maxr, fname, sep=",", col.names=TRUE, row.names=TRUE,
quote=TRUE, na="0"
4 matches
Mail list logo