Re: [R-SIG-Mac] R-SIG-Mac Digest, Vol 205, Issue 13

2020-04-02 Thread Eberhard W Lisse
I think I will play with this over the weekend, especially if the calm before 
the storm prevails.

el

—
Sent from Dr Lisse’s iPad Mini 5
On 2 Apr 2020, 22:21 +0200, Duncan Murdoch , wrote:
> That lists "base" as a package, as well as the other base and
> recommended packages. That's not what Dr. Lisse was looking for: he
> wanted "all user installed (additional) packages, ie not the ones that
> come with R?".
>
> Duncan Murdoch
>
> On 02/04/2020 10:47 a.m., Colin A. Smith wrote:
> > This will do it as well:
> >
> > package_list <- tapply(rownames(installed.packages()), 
> > installed.packages()[,"LibPath"], c)
> >
> > Bonus to find out which library directories are writable by the user:
> >
> > file.access(names(package_list), mode=2) == 0
> >
> > Cheers,
> >
> > Colin
> >
> > > On Apr 2, 2020, at 10:36, Michael Hall  wrote:
> > >
> > > > On Apr 2, 2020, at 6:10 AM, r-sig-mac-requ...@r-project.org wrote:
> > > >
> > > > > Is there a way of (only) listing all user installed (additional)
> > > > > packages, ie not the ones that come with R?
> > >
> > > https://www.r-bloggers.com/list-of-user-installed-r-packages-and-their-versions/
> > >  
> > > 
> > >
> > > Sys.getenv()
> > > …
> > > R_LIBS_USER ~/Library/R/3.6/library
> > > …
> > >
> > > list.files('~/Library/R/3.6/library')
> > > [1] "alphavantager" "BBmisc" "brew" "C50"
> > > [5] "checkmate" "clisymbols" "coda" "commonmark”
> > > ...
> >
> > ___
> > R-SIG-Mac mailing list
> > R-SIG-Mac@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
>
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] R-SIG-Mac Digest, Vol 205, Issue 13

2020-04-02 Thread Duncan Murdoch
That lists "base" as a package, as well as the other base and 
recommended packages.  That's not what Dr. Lisse was looking for:  he 
wanted "all user installed (additional) packages, ie not the ones that 
come with R?".


Duncan Murdoch

On 02/04/2020 10:47 a.m., Colin A. Smith wrote:

This will do it as well:

package_list <- tapply(rownames(installed.packages()), 
installed.packages()[,"LibPath"], c)

Bonus to find out which library directories are writable by the user:

file.access(names(package_list), mode=2) == 0

Cheers,

Colin


On Apr 2, 2020, at 10:36, Michael Hall  wrote:


On Apr 2, 2020, at 6:10 AM, r-sig-mac-requ...@r-project.org wrote:


Is there a way of (only) listing all user installed (additional)
packages, ie not the ones that come with R?


https://www.r-bloggers.com/list-of-user-installed-r-packages-and-their-versions/ 


Sys.getenv()
…
R_LIBS_USER ~/Library/R/3.6/library
…

list.files('~/Library/R/3.6/library')
[1] "alphavantager" "BBmisc""brew"  "C50"
[5] "checkmate" "clisymbols""coda"  "commonmark”
...


___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac



___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] R-SIG-Mac Digest, Vol 205, Issue 13

2020-04-02 Thread peter dalgaard
> On 2 Apr 2020, at 16:47 , Colin A. Smith  wrote:
> 
> tapply(rownames(installed.packages()), installed.packages()[,"LibPath"], c)

or

X <- installed.packages()
split(rownames(X), X[,"LibPath"])


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] R-SIG-Mac Digest, Vol 205, Issue 13

2020-04-02 Thread Colin A. Smith
This will do it as well:

package_list <- tapply(rownames(installed.packages()), 
installed.packages()[,"LibPath"], c)

Bonus to find out which library directories are writable by the user:

file.access(names(package_list), mode=2) == 0

Cheers,

Colin

> On Apr 2, 2020, at 10:36, Michael Hall  wrote:
> 
>> On Apr 2, 2020, at 6:10 AM, r-sig-mac-requ...@r-project.org wrote:
>> 
>>> Is there a way of (only) listing all user installed (additional)
>>> packages, ie not the ones that come with R?
> 
> https://www.r-bloggers.com/list-of-user-installed-r-packages-and-their-versions/
>  
> 
> 
> Sys.getenv()
> …
> R_LIBS_USER ~/Library/R/3.6/library
> …
> 
> list.files('~/Library/R/3.6/library')
> [1] "alphavantager" "BBmisc""brew"  "C50"  
> [5] "checkmate" "clisymbols""coda"  "commonmark”   
> ...

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] R-SIG-Mac Digest, Vol 205, Issue 13

2020-04-02 Thread Michael Hall



> On Apr 2, 2020, at 6:10 AM, r-sig-mac-requ...@r-project.org wrote:
> 
>> Is there a way of (only) listing all user installed (additional)
>> packages, ie not the ones that come with R?

https://www.r-bloggers.com/list-of-user-installed-r-packages-and-their-versions/
 


Sys.getenv()
…
R_LIBS_USER ~/Library/R/3.6/library
…

list.files('~/Library/R/3.6/library')
 [1] "alphavantager" "BBmisc""brew"  "C50"  
 [5] "checkmate" "clisymbols""coda"  "commonmark”   
...
[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac