[R] Rearranging sub-folders, how?
David Winsemius
dwinsemius at comcast.net
Sat Oct 1 17:50:01 CEST 2016
> On Oct 1, 2016, at 5:50 AM, Kristi Glover <kristi.glover at hotmail.com> wrote:
>
> Thanks Jim for the suggestions.
>
> I used following but it seems not working
>
> dir.create(foldA\subFoldB\subFoldD\subFoldC\subFoldE)
In R character values need to be quoted and backslashes need to be escaped ... with backslashes. Read the R-FAQ:
https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-does-backslash-behave-strangely-inside-strings_003f
--
david.
>
> I got a trouble in moving contents of one folder to another.
>
> ________________________________
> From: Jim Lemon <drjimlemon at gmail.com>
> Sent: October 1, 2016 6:07 AM
> To: Kristi Glover
> Cc: r-help at r-project.org
> Subject: Re: [R] Rearranging sub-folders, how?
>
> Hi Kristi,
> I assume that B, C and D are not empty, otherwise the answer is trivial.
>
> create a directory under B named D
> move the contents of the old D to the new D
> delete the directory E beneath the new D
> create a new directory C under the new D
> move the contents of the old C to the new C
> recursively delete D under the new C
> move the old E under the new C
> recursively delete the old C
>
> Jim
>
>
> On Sat, Oct 1, 2016 at 9:29 PM, Kristi Glover <kristi.glover at hotmail.com> wrote:
>> Hi R user,
>>
>> I was wondering how we can rearrange the folders in R. for example
>>
>> original data has been put with the following arrangement:
>>
>> foldA\subFoldB\subFoldC\subFoldD\subFoldE\
>>
>>
>> SubFoldE contains several dataset
>>
>>
>> I want to rearrange the subFoldE into following sequence:
>>
>>
>> foldA\subFoldB\subFoldD\subFoldC\subFoldE\
>>
>>
>> Any suggestions?
>>
>> Thanks
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list