Nothing
update_all = TRUE
. Closes #27.LazyData
from DESCRIPTION for CRAN resubmission.stock()
lets you install packages from a list without attaching them, unlike shelf()
which does both. Closes #26.shelf()
was refactored to pull package installation into the new stock()
function.testthat
has changed since the last librarian
version c. 2019. Updated the list.stock()
and shelf()
are now reported in the same order as the user gave them in ...
.update_all = TRUE
in shelf()
and stock()
now force reinstallation of a GitHub package even if the remote package's SHA1 matches the installed version. The reasoning is a) that 'forcing an update' should actually perform an update even if the files are identical, and b) in the event that some of the user's files have been changed, the stored SHA1 will not reflect this. Closes #24.lib_paths()
doesn't call itself as an argument in shelf()
. Thanks, Miles Smith!shelf()
now exits as soon as possible by trying to attach all packages right at the start of the function. Previously, package attachment was done only at the end, after all the other checks were done. If you set update_all = TRUE
then the function will run package installation first and package attachment second. Closes #19.unshelf()
only acts on dependencies that are actually attached. It previously also acted on packages that were only namespaced but not attached. Closes #20.make_dirs()
no longer validates filenames that contain dots as if they were filenames, e.g. C:/MyPath/R/3.5
.lib_paths()
shows names of non-writeable paths, instead of the result -1
.safe = FALSE
in unshelf()
. If safe = TRUE
, the packages that you've set as default ones in your .RProfile (via lib_startup()
for example) will not be detached. Fixes #17.check_attached()
and check_installed()
, which lets you check the status of packages. If you run the functions with no packages named, they will return a list of all packages that are attached and installed.shelf()
, unshelf()
, reshelf()
, check_attached()
, and check_installed()
can now accept four different input methods:shelf(package, name, here)
shelf("package", "name", "here")
shelf("package", name, "here")
...
. shelf(c("package", "name", "here"))
remotes
. They also make it possible to use these functions inside scripts, like passing package lists around.unshelf()
with everything = TRUE
arg now detaches all non-default packages if safe = FALSE
is also set. In the past, it would leave behind the packages that you had added to your .Rprofile using lib_startup()
. This is still the default behaviour.biocLite
has been replaced with BiocManager
for installing BioConductor packages. BiocManager
has been added as a dependency.browse_cran()
for searching CRAN package titles and descriptions by keyword or regular expression.nse_dots()
used to insert spaces in names that included -
because it was formatting them nicely as if they were expressions with the minus operator. The function now removes any spaces that were created in the process of converting from a symbol to a string. Closes #13.remotes
replaces devtools
. Closes #11.backports
package is no longer needed.librarian:::check_installed()
failed if the package name had a .
inside it, so those packages were installable but not attachable with librarian. Closes #12.cran_repo
argument in shelf()
contains the default R value @CRAN@
. Closes Issue #10. Thanks, Jim Hunter!lib_startup()
uses to mark the lines it edited previously indicated an old function name.check_installed()
now works much faster, so librarian in general should work much faster because check_installed()
was called in every function.lib_startup()
lets you set library search paths and packages that will be loaded globally at the start of every R session, or on a per-project basis.shelf()
now supports installing Bioconductor packages via biocLite()
. Bioconductor's Biobase
package needs to be installed before librarian will attempt to install Bioconductor packages.backports
so that users of R < 3.5.0 do not have to update their R installation for only one important function that librarian needs (...length()
). Closes issue #4.lib_paths()
is a wrapper for .libPaths()
with folder creation built-in. It
lets you name and create folders where new packages will be installed, view the folders
that are on the package search path, and reshuffle their order.lib
argument for shelf()
lets you specify the folder where new packages will
be installed. The ask
argument controls whether R asks for permission before creating
this folder; set ask = FALSE
to create the folder automatically.update_all = TRUE
, a new copy of the package will be installed to
lib
. This means that you can potentially have several copies of the same package
across many folders on your machine, each a different version. I felt that this was
reasonable so that you could maintain a different library folder for different
projects, and updates that you made in Project B would not affect the package
versions you rely on for Project A.cran_repo
warning raised by shelf()
now shows the original string.unshelf()
raises an error when you haven't told it to detach anything.shelf()
now sets a default CRAN repo properly on the command line.custom_repo
argument in shelf()
has been renamed to cran_repo
.cran_repo
arg checks that its value is a valid URL. I previously supported
custom_repo = NULL
because the base install.packages()
uses NULL
to signal
installation from a local file, but the point of librarian is to install CRAN and
GitHub packages from the net, so cran_repo
does not keep this functionality.shelf()
, unshelf()
, and reshelf()
now invisibly return named vectors
describing the packages that were operated on and whether they were successfully
attached or detached.unshelf(everything = TRUE)
argument detaches all packages except for the default
ones.unshelf(safe = TRUE)
argument checks if packages are still needed by others
before detaching them.unshelf(warn = TRUE)
argument will print a Message if packages were not detached
(because safe = TRUE
and the packages were still needed).unshelf(..., also_depends = TRUE)
argument detaches packages named in ...
as
well as their dependencies.safe
and quiet
arguments defaulting to TRUE
, the default behaviour is
to leave packages behind if other packages in the search path still need them, but
not to interrupt the user with a message about it. unshelf()
still invisibly
returns the success/failure for each package it attempted to detached.tools
package, but it's distributed
with R.reshelf()
for refreshing a package. Useful for loading new builds of your
personal package.unshelf()
can handle the Github Username/packagename format now, instead of
requiring the user to provide only the package name. The biggest effect of this change
is that if you want to unload your packages, you can now just change your shelf()
to
unshelf()
and run it.shelf()
and unshelf()
check for duplicates in the package list you provide.utils
(a default package) for base R's package-handling functions.
Omitting this caused warnings in R CMD CHECK.unshelf()
that made it try to unload packages even if they were not
loaded.custom_repo
argument for shelf()
, which defaults to R's default behaviour.rlang
. Only imports devtools
now.shelf()
now returns devtools::session_info()
invisibly so that you can print
it.NEWS.md
file to track changes to the package.shelf()
and unshelf()
in feature-complete form.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.