Re: [R] Listing folders on One Drive

2024-05-20 Thread John Fox

Dear Nick,

See list.dirs(), which is documented in the same help file as list.files().

I hope this helps,
 John

--
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://www.john-fox.ca/
--
On 2024-05-20 9:36 a.m., Nick Wray wrote:

[You don't often get email from nickmw...@gmail.com. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

Caution: External email.


Hello I have lots of folders of individual Scottish river catchments on my
uni One Drive.  Each folder is labelled with the river name eg "Tay" and
they are all in a folder named "Scotland"
I want to list the folders on One Drive so that I can cross check that I
have them all against a list of folders on my laptop.
Can I somehow use list.files() - I've tried various things but none seem to
work...
Any help appreciated
Thanks Nick Wray

 [[alternative HTML version deleted]]

__
R-help@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.


__
R-help@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.


Re: [R] Listing folders on One Drive

2024-05-20 Thread avi.e.gross
Nick,

As Jeff said, we don't know what you tried and what did not work.

There are built-in and probably package versions but have you tried
something like list.files()?

You can tweak it to get the files you want by doing something like:

-change directory to HERE
- here.files <- list.files(recursive=TRUE)
- change directory to THERE
- here.files <- list.files(recursive=TRUE)

Now compare what you have in the two places. There are many ways but if all
the files in or, if recursive, deeper, are the same, you have them all. Of
course this does not test to see if the files are identical. Or you could
use sorting and comparing to see if you can isolate what is missing, or use
set operations that test for intersection or something like"

Missing <- setdiff(here.files, there.files)

And in that case, also test the reverse.

The function setequal() test for equality but won't tell you what is
missing.

Obviously, if your method generates full, not relative file names, you could
process the names to remove a fixed prefix.

-Original Message-
From: R-help  On Behalf Of Nick Wray
Sent: Monday, May 20, 2024 9:37 AM
To: r-help@r-project.org
Subject: [R] Listing folders on One Drive

Hello I have lots of folders of individual Scottish river catchments on my
uni One Drive.  Each folder is labelled with the river name eg "Tay" and
they are all in a folder named "Scotland"
I want to list the folders on One Drive so that I can cross check that I
have them all against a list of folders on my laptop.
Can I somehow use list.files() - I've tried various things but none seem to
work...
Any help appreciated
Thanks Nick Wray

[[alternative HTML version deleted]]

__
R-help@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.

__
R-help@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.


Re: [R] Listing folders on One Drive

2024-05-20 Thread Jeff Newmiller via R-help
What does "doesn't work" mean? What have you tried?

On May 20, 2024 6:36:58 AM PDT, Nick Wray  wrote:
>Hello I have lots of folders of individual Scottish river catchments on my
>uni One Drive.  Each folder is labelled with the river name eg "Tay" and
>they are all in a folder named "Scotland"
>I want to list the folders on One Drive so that I can cross check that I
>have them all against a list of folders on my laptop.
>Can I somehow use list.files() - I've tried various things but none seem to
>work...
>Any help appreciated
>Thanks Nick Wray
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@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.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@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.


[R] Listing folders on One Drive

2024-05-20 Thread Nick Wray
Hello I have lots of folders of individual Scottish river catchments on my
uni One Drive.  Each folder is labelled with the river name eg "Tay" and
they are all in a folder named "Scotland"
I want to list the folders on One Drive so that I can cross check that I
have them all against a list of folders on my laptop.
Can I somehow use list.files() - I've tried various things but none seem to
work...
Any help appreciated
Thanks Nick Wray

[[alternative HTML version deleted]]

__
R-help@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.


[R] Availability of Sdatasets

2024-05-20 Thread Avro Alo via R-help
>From the mention in R-intro I went to look at The new S language
book. In chapter 1 it has a lottery dataset. So naturally I thought
it is pre-supplied with R. But I didn't fount, made a google search and found 
the package that has the dataset, 
https://docs.tibco.com/pub/enterprise-runtime-for-R/6.1.1/doc/html/Language_Reference/Sdatasets/00Index.html
 

This package is very interesting on it's own. But how can I get it?

Also, shouldn't regular R installation have this too?

Thanks!

(first time posting here)

__
R-help@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.