[R] save at relative directory

Joshua Wiley jwiley.psych at gmail.com
Tue Nov 8 14:43:04 CET 2011


Hi Alex,

Look at some of these functions:

apropos("dir")
apropos("exists")

Cheers,

Josh


On Tue, Nov 8, 2011 at 5:36 AM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
> I have a variable called thres and before I run a script I set it to a value
> like
> thres<- -10
> at the end of the execution I am issuing a save(variablename,file='Results')
> which will end up with a file saved at the current directory with the name Results
>
> I would like though to use thres value and do the followingg
> save at the directory called 10 so to get ./10/Results, (yes I want this in a relative order)
>
> My question is how I can also check if the directory exists R to create it?
>
> I would like to thank you in advance for your help
>
> B.R
> Alex
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-help mailing list