roxygen2

Importing two functions with same name using roxygen2

主宰稳场 提交于 2019-12-24 12:17:32
问题 I'm a maintainer of a CRAN package and get the following messages when loading: * checking whether package ‘qdap’ can be installed ... [10s/10s] WARNING Found the following significant warnings: Warning: replacing previous import ‘annotate’ when loading ‘NLP’ Warning: replacing previous import ‘rescale’ when loading ‘scales’ Because I use the plotrix and scales packages as well as the NLP and ggplot packages. They have the functions rescale and annotate in common. This results in a

Roxygen error “Skipping invalid path”

[亡魂溺海] 提交于 2019-12-24 02:23:24
问题 The output from running devtools::document(). I have no idea how to fix this and the roxygen documentation is not great at helping figure error messages out. Any ideas on how to get rid of this so my functions can be documented? Updating NEONExclusionZones documentation Loading NEONExclusionZones First time using roxygen2 4.0. Upgrading automatically... Writing NAMESPACE Skipping invalid path: 1CalcMosqImpact-TITLE.Rd Skipping invalid path: 1IstotopicChange-TITLE.Rd Skipping invalid path:

How to manage and address supplementary data in R packages

非 Y 不嫁゛ 提交于 2019-12-24 02:22:29
问题 I'd like to have supplementary data in my R package. I know about LazyData: true in DESCRIPTION , but do not want to use it because the example data is quite large. So I created a dir " data " which holds two .RData files and a datalist , which I added using tools::add_datalist . datalist supA.RData supB.RData Furthermore, I am using roxygen2 to create a documentation - I want to document the .RData files, too. (I read somewhere, that this is even necessary.) First question: is it correct to

R CMD check fails with “undefined exports”

守給你的承諾、 提交于 2019-12-24 02:12:15
问题 I'm trying to create an R package but I keep getting the error: Error in namespaceExport(ns, exports) : undefined exports: MCLE, defineFunctions, naiveMLE when running R CMD check on my package. I'm using roxygen2 , and the three functions listed in the error message are the three with @export tags. I've checked similar problems/solutions on stack overflow: R: Error in namespaceExport(ns, exports) : undefined exports: Error in namespaceExport(ns, exports) : undefined exports: ... Error:

Roxygen Warning “cannot open the connection” “Permission Denied”

半城伤御伤魂 提交于 2019-12-23 22:23:27
问题 I'm working with roxygen2 and for some reason I can't get it to run. I've tried: > devtools::load_all() > devtools::document() which resulted in: Updating xxxx documentation Loading xxxx First time using roxygen2. Upgrading automatically... Writing NAMESPACE Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open file 'C:\Users\xxxxxxx': Permission denied I also tried: > roxygen2::roxygenise() yielding: Loading xxxx Error in file(con,

roxygen2 how to not run example file

浪尽此生 提交于 2019-12-23 11:51:49
问题 I am well aware of how to have roxygen not run an example when the code is directly in the roxygen comments. However, some example may be somewhat verbose or you would want you examples compiled in an examples directory. In which case the @example file_path works fine but I can't figure out how to have roxygen not run (i.e. \dontrun ) the example file . This is admitted very similar to this question but the comments show that this problem was not answered. test.R # this does not work #'

roxygen2 not generating NAMESPACE correctly

本小妞迷上赌 提交于 2019-12-22 08:44:29
问题 I have a package that builds successfully and without warnings under ubuntu 12.04. The package is pure R, and has approximately 70 functions (approx 2000 LOCs). When I try to build under Windows 7 in Rstudio, the package builds successfully (no warnings) but NAMESPACE contains export() for only a dozen functions. First time it happens to me, probably because I rarely use Windows. This happens under 3.1 and the latest version of Rstudio and roxygen2. Has it happened to any of you? What could

R with roxygen2: How to use a single function from another package?

送分小仙女□ 提交于 2019-12-22 08:34:35
问题 I'm creating an R package that will use a single function from plyr . According to this roxygen2 vignette: If you are using just a few functions from another package, the recommended option is to note the package name in the Imports: field of the DESCRIPTION file and call the function(s) explicitly using ::, e.g., pkg::fun(). That sounds good. I'm using plyr::ldply() - the full call with :: - so I list plyr in Imports: in my DESCRIPTION file. However, when I use devtools::check() I get this:

Verbatim output in roxygen2 package documentation

早过忘川 提交于 2019-12-22 04:44:15
问题 I am using roxygen2 from within RStudio to generate package documentation. How do I force the following in the @description section to appear as verbatim fixed-font? SettingID Value RedItem Patient_10574 GreenItem Record_433 My workaround is to put it into @examples \dontrun{}, but that's not what I want. @Joshua Ulrich found a (non-)solution to here 回答1: UPDATE : Wrapping is now turned off by default in roxygen2 , so this should not be an issue anymore. I have invented a new comment syntax

Roxygen2 - how to @export reference class generator?

懵懂的女人 提交于 2019-12-22 04:01:52
问题 For instance, say I have the following package called Test and I want to export class A : # In /R/Test.R: #' @docType package #' @import methods #' @exportClass A A <- setRefClass("A", methods = list(foo = identity)) However, after building and loading, I get the following error when using A 's generator: > library(Test) > A()$foo(1) Error: could not find function "A" I've checked the contents of my NAMESPACE file is fine: exportClasses(A) import(methods) So what's going wrong? Why isn't my