Message-ID: <53268035-29E6-4492-BDE0-F0D0D8F0CE2D@colinsmith.org>
Date: 2020-04-02T14:47:30Z
From: Colin A. Smith
Subject: R-SIG-Mac Digest, Vol 205, Issue 13
In-Reply-To: <791F6F32-54C2-4A90-9795-31F4FE56889B@gmail.com>
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 <mik3hall at gmail.com> wrote:
>
>> On Apr 2, 2020, at 6:10 AM, r-sig-mac-request at 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/ <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?
> ...