Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flavour "base" to the scaffold files #5

Open
jennybc opened this issue Jan 31, 2018 · 1 comment
Open

Add a flavour "base" to the scaffold files #5

jennybc opened this issue Jan 31, 2018 · 1 comment

Comments

@jennybc
Copy link
Member

jennybc commented Jan 31, 2018

No description provided.

@galbraic
Copy link

My attempt at the morning exercise in base...

use installed.packages() to get all installed packages

how many packages?

pkg <- as.data.frame(installed.packages())
nrow(pkg)
head(pkg)

#' Exploring the packages

count some things! inspiration

summary(pkg)

* tabulate by LibPath, Priority, or both

table(pkg$Priority)
table(pkg$LibPath)

* what proportion need compilation?

table(pkg$NeedsCompilation)

* how break down re: version of R they were built on

table(pkg$Built)

#' Reflections

reflect on ^^ and make a few notes to yourself; inspiration

* does the number of base + recommended packages make sense to you?

table(pkg$Priority)
pkg[which(pkg$Priority == 'base'), ]
pkg[which(pkg$Priority == 'recommended'), ]

* how does the result of .libPaths() relate to the result of .Library?

both give same results, but are located in different directories....

.libPaths() # gives package source available to R version of current session
.Library # gives package source for all R versions installed on a machine

#' Going further

if you have time to do more ...

is every package in .Library either base or recommended?

dir(.Library) %in% pkg$Package[which(pkg$Priority %in% c("base", "recommended"))]

not for me... Jenny sets hers up so this is true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants