After I run my script I save all my output e.g. write.table(d, file = "C:/PINEheight.txt) write.table(v, file = "C:/PINEvolume.txt) write.table(v, file = "C:/PINEdiameter.txt) write.table(v, file = "C:/PINEdensity.txt) and then I would like to run again with another tree and save again e.g write.table(d, file = "C:/POPULUSheight.txt) Is there anyhow I can define a variable as "tree name" and make it change everytime in all the output files names e.g. write.table(d, file = "C:/"tree name" height.txt) Thanks in advance M?rcio -- View this message in context: http://www.nabble.com/chage-the-output-file-name-tp25530892p25530892.html Sent from the R help mailing list archive at Nabble.com.
Try this:
treeName <- "PINE"
write.table(d, file = sprintf("C:/%sheight.txt", treeName))
On Tue, Sep 22, 2009 at 5:29 PM, Marcio Resende
<mresendeufv at yahoo.com.br> wrote:>
> After I run my script I save all my output e.g.
>
> write.table(d, file = "C:/PINEheight.txt)
> write.table(v, file = "C:/PINEvolume.txt)
> write.table(v, file = "C:/PINEdiameter.txt)
> write.table(v, file = "C:/PINEdensity.txt)
>
> and then I would like to run again with another tree and save again e.g
> write.table(d, file = "C:/POPULUSheight.txt)
>
> Is there anyhow I can define a variable as "tree name" and make
it change
> everytime in all the output files names e.g.
> write.table(d, file = "C:/"tree name" height.txt)
>
> Thanks in advance
> M?rcio
> --
> View this message in context:
http://www.nabble.com/chage-the-output-file-name-tp25530892p25530892.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O
On 23/09/2009, at 12:14 PM, Henrique Dallazuanna wrote:> Try this: > > treeName <- "PINE" > write.table(d, file = sprintf("C:/%sheight.txt", treeName))Why not use the (less esoteric) paste() function? cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
Possibly Parallel Threads
- plotting two surfaces simultaneously in a single panel
- [LLVMdev] dragonegg: switch from old TBAA format to the new struct-path aware TBAA format
- [LLVMdev] dragonegg: switch from old TBAA format to the new struct-path aware TBAA format
- Chage Asterisk 1.6.1 to 1.6.2
- how to chage values in data frame to NA iside a function