[R] Write-table and dynamic access path

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Fri Aug 2 17:33:31 CEST 2013


Or ?file.path for a more OS- independent approach.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Jim Holtman <jholtman at gmail.com> wrote:
>?paste
>
>Sent from my iPad
>
>On Aug 2, 2013, at 6:20, Robert U <tacsunday at yahoo.fr> wrote:
>
>> Dear R-users,
>> 
>> I am quite sure this is a beginner question, but i cannot manager to
>find the answer on the Internet... 
>> 
>> 
>> I am using write.table function inside some kind of loop. I'd like to
>write my tables in different folders without having to change the path
>inside the function every time, but rather by including a variable
>inside the path. For example, i have 5 folders (named 1,2,3,4,5) , i
>have a variable that get values from 1 to 5 during my loop, I'd like to
>insert this variable� inside the pathway specified in the write.table
>so that the table are "automatically' saved in the proper folder... But
>I cannot manage to find the correct syntax for this to happen!!
>> 
>> Any tips ?
>> 
>> Best regards
>> 
>>    [[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.
>
>______________________________________________
>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.



More information about the R-help mailing list