You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's slightly annoying to set the package at the beginning of every session. Might I suggest that the current directory be used as the default. This requires very minor changes to the as.package function. I thought this so minor a change that there was no need to include it in a formal pull request.
#' Coerce input to a package.#' #' Possibile specifications of package:#' \itemize{#' \item path#' \item name (lookup in .Rpackages)#' \item package object#' }#' @param x object to coerce to a package#' @exportas.package<-function(x=NULL) {
if (is.null(x)) {
x<- get_last_package()
}
if (is.null(x)) {
message("package not set, checking '.'")
x<-'.'
}
elseif (is.package(x))
return(x)
path<- find_package(x)
if (is.null(path)) {
stop("Can't find package ", x, call.=FALSE)
}
pkg<- load_pkg_description(path)
set_last_package(pkg)
}
The text was updated successfully, but these errors were encountered:
It's slightly annoying to set the package at the beginning of every session. Might I suggest that the current directory be used as the default. This requires very minor changes to the as.package function. I thought this so minor a change that there was no need to include it in a formal pull request.
The text was updated successfully, but these errors were encountered: