d. sarthi maheshwari
2007-Mar-23 11:21 UTC
[R] Creating new directory/folder from R script on run time.
Hi, Please correct me if this request does not belong to this discussion forum. Kindly suggest me if there is a way to create a new folder from R on runtime? for e.g.>From one of my R script I want to store the PDF result file in a perticularfolder let say c:\tt for that initially i am creating "tt" folder manually and using the following command: fname <- paste("C:/tt/result", strptime(Sys.time(),"%Y-%m-%d"), ".pdf", sep="") pdf(file = fname, width = 13, height = 6) --- --- blah blah --- --- dev.off() Can I, in any manner, create the "tt" folder from R script itself on runtime? -- Thanks and Regards Sarthi M. [[alternative HTML version deleted]]
Henrique Dallazuanna
2007-Mar-23 11:57 UTC
[R] Creating new directory/folder from R script on run time.
Perhaps you can try:
?dir.create
dir.create('C:\tt')
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22"
O<http://maps.google.com/maps?f=q&hl=en&q=Curitiba,+Brazil&layer=&ie=UTF8&z=18&ll=-25.448315,-49.276916&spn=0.002054,0.005407&t=k&om=1>
On 23/03/07, d. sarthi maheshwari <samay.sar@gmail.com>
wrote:>
> Hi,
>
> Please correct me if this request does not belong to this discussion
> forum.
>
> Kindly suggest me if there is a way to create a new folder from R on
> runtime?
>
> for e.g.
> >From one of my R script I want to store the PDF result file in a
> perticular
> folder let say c:\tt
>
> for that initially i am creating "tt" folder manually and using
the
> following command:
>
> fname <- paste("C:/tt/result",
strptime(Sys.time(),"%Y-%m-%d"),
> ".pdf", sep="")
> pdf(file = fname, width = 13, height = 6)
> ---
> ---
> blah
> blah
> ---
> ---
> dev.off()
>
> Can I, in any manner, create the "tt" folder from R script itself
on
> runtime?
>
> --
> Thanks and Regards
> Sarthi M.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>
[[alternative HTML version deleted]]