devtools

Package reverse dependency checks (especially on Windows)

随声附和 提交于 2020-08-27 22:34:08
问题 I would like to hear how folks do their reverse dependency checks on Windows these days. When using the "official", yet experimental function tools::check_packages_in_dir() as suggested by CRAN Repository Policy [1] on Windows, reverse dependencies are checked based on their sources, i.e., everything is to be compiled. This can take ages even for relatively few dependencies/suggested packages. Next to that, it is not very convenient as I hit a lot of missing packages in the process so that

Package reverse dependency checks (especially on Windows)

梦想与她 提交于 2020-08-27 22:32:35
问题 I would like to hear how folks do their reverse dependency checks on Windows these days. When using the "official", yet experimental function tools::check_packages_in_dir() as suggested by CRAN Repository Policy [1] on Windows, reverse dependencies are checked based on their sources, i.e., everything is to be compiled. This can take ages even for relatively few dependencies/suggested packages. Next to that, it is not very convenient as I hit a lot of missing packages in the process so that

R: How to lazyload variables from inst/extdata in R package

谁说胖子不能爱 提交于 2020-08-22 06:00:20
问题 I have a file helper.RData file in my inst/extdata that contains variables and datasets to be used by the functions in my package, but not meant to be accessed by the user. I load it at the beginning of the package using: load(system.file("extdata","helper.RData", package = "mypackage")) As the file is big this takes quite a bit of time and it is especially annoying during development (I use quite a loot the function load_all() from the devtools package). I would rather prefer to have it lazy

R package fails devtools::check, because “could not find function” even though the function is imported in NAMESPACE

生来就可爱ヽ(ⅴ<●) 提交于 2020-07-21 05:25:47
问题 Trying to build my first R package using roxygen2 and devtools . I have added a function that uses %>% and mutate in the @examples section. When I run check() it fails, because it cannot find the function %>% or mutate . Based on this, this, and this I have tried the following: I have #' importFrom magrittr %>% and #' importFrom dplyr mutate in the function's .R file. I also have magrittr and dplyr under Imports: in the DESCRIPTION file. After running document() , my NAMESPACE file contains

R package fails devtools::check, because “could not find function” even though the function is imported in NAMESPACE

╄→尐↘猪︶ㄣ 提交于 2020-07-21 05:25:11
问题 Trying to build my first R package using roxygen2 and devtools . I have added a function that uses %>% and mutate in the @examples section. When I run check() it fails, because it cannot find the function %>% or mutate . Based on this, this, and this I have tried the following: I have #' importFrom magrittr %>% and #' importFrom dplyr mutate in the function's .R file. I also have magrittr and dplyr under Imports: in the DESCRIPTION file. After running document() , my NAMESPACE file contains

R package development how to suppress messages generated from dependency package?

こ雲淡風輕ζ 提交于 2020-07-10 06:04:28
问题 I am developing an R package called VSHunter and need NMF package as a dependency, however, every time load NMF will throw many message, I don't know how to suppress them. > devtools::load_all(".") Loading VSHunter Loading required package: NMF Loading required package: pkgmaker Loading required package: registry Attaching package: ‘pkgmaker’ The following object is masked from ‘package:base’: isFALSE Loading required package: rngtools Loading required package: cluster NMF - BioConductor

R package development how to suppress messages generated from dependency package?

女生的网名这么多〃 提交于 2020-07-10 06:04:19
问题 I am developing an R package called VSHunter and need NMF package as a dependency, however, every time load NMF will throw many message, I don't know how to suppress them. > devtools::load_all(".") Loading VSHunter Loading required package: NMF Loading required package: pkgmaker Loading required package: registry Attaching package: ‘pkgmaker’ The following object is masked from ‘package:base’: isFALSE Loading required package: rngtools Loading required package: cluster NMF - BioConductor

Data not exported from namespace in R

心不动则不痛 提交于 2020-06-24 11:37:05
问题 I've set up and been regularly updating my R package to GitHub following Hadley's extensive documentation about Devtools, Roxygen2 etc., on my laptop. Yesterday I decided to use my main PC instead and am now looking to push changes up to GitHub. I got the following error after entering document() : Error: 'Adult_Females' is not an exported object from 'namespace:gbm.auto' Adult_Females is the name of the first data file in /Data. According to this (scroll down to 'Data') "files that live in

NAMESPACE not generated by roxygen2. Skipped. - Confusion with Hadley book

扶醉桌前 提交于 2020-06-24 07:08:26
问题 I am trying to make a package but when I run document() it prints NAMESPACE not generated by roxygen2. Skipped. I am trying to use ggplot2,XML, R6 packages in my functions. I am importing them in the following way: #' @rdname visualization #' @param hist_data A table of weather variables with PWS created by hist_data function #' @param variable A character string of variable name #' @examples #' table <- getWeather(city = "San Francisco", state="CA") #' please <- getConditionsTable(table,