Questions tagged [package-development]

73 questions
5
votes
0 answers

Is there an equivalent of `pip install -e` in R?

From python pip install -h: -e, --editable Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url. Basically , if you pip install -e , pip…
naught101
  • 18,687
  • 19
  • 90
  • 138
5
votes
2 answers

How to save a VERY LARGE .rda file in R package

I am eager to save two 460 x 5000 numeric matrices into my R-package. Following the instructions in: How to effectively deal with uncompressed saves during package check? I saved the objects…
FairyOnIce
  • 2,526
  • 7
  • 27
  • 48
4
votes
2 answers

How to initialize workers to use package functions in parallel

I am developing an R package and trying to use parallel processing in it for an embarrassingly parallel problem. I would like to write a loop or functional that uses the other functions from my package. I am working in Windows, and I have tried…
4
votes
1 answer

Set www location in shiny::shinyApp

I am currently creating a shiny app that gets invoked with shiny::shinyApp via a wrapper function. startApp <- function(param1, param2, ...){ # in fact, ui and server change based on the parameters ui <- fluidPage() server <- function(...){} …
Gregor de Cillia
  • 7,397
  • 1
  • 26
  • 43
4
votes
1 answer

r - document() package fails Error in if (pkg$package == "devtools") { : argument is of length zero

UPDATE I have completed the package and it is hosted online at https://github.com/iembry-USGS/ie2misc. Since the error message in the original post was not helpful, I attempted to roxygenize the package to see if that would work or not. Below are…
iembry
  • 962
  • 1
  • 7
  • 23
4
votes
0 answers

How to autoupdate version number on successful build of an R package

I found this article (original) about how to auto update a package version number in R. I would like to implement it in the same way as they suggest but I fail at the point to create my own Makefile to build a package. The function they provide is…
drmariod
  • 11,106
  • 16
  • 64
  • 110
4
votes
1 answer

R package development - old version of function used in project

I am developing a package locally with devtools in RStudio. After modifying a function, when I try to call it from a project, R keeps using the old version of the function. My workflow is to: Modify the function and save Call Build & Reload Test…
Sarah N
  • 518
  • 7
  • 22
3
votes
1 answer

Separating error message from error condition in package

Background Packages can include a lot of functions. Some of them require informative error messages, and perhaps some comments in the function to explain what/why is happening. An example, f1 in a hypothetical f1.R file. All documentation and…
Donald Seinen
  • 4,179
  • 5
  • 15
  • 40
3
votes
1 answer

devtools::use_data( , internal =TRUE)

I want to use an array, say aaa, as internal data by devtools::use_data( aaa,internal =TRUE). But this command make only one file sysdata.rda. Why ? Why several internal data files does not be allowed to exist?. I also cannot understand the…
Camford Oxbridge
  • 834
  • 8
  • 21
3
votes
0 answers

Steps for building a formula interface for existing function in R?

There are many R functions out there but only some of them have a standard formula interface (see e.g. this question: Formula interface for glmnet). I think in general formula interfaces are a good way to standardize R functions and provide a…
vonjd
  • 4,202
  • 3
  • 44
  • 68
2
votes
1 answer

Map Raggedly to Depth but Stop at Sentinel

Motivation I am developing an R package with an essential helper function "make()". This make() function accepts a ragged list, then maps function foo() onto the penultimate nodes ("twigs") in the list: those whose children are leaves. So far…
Greg
  • 3,054
  • 6
  • 27
2
votes
2 answers

How to access Sanctum package in custom laravel package

i want to access laravel sanctum auth which is working fine in project routes I'm making a custom package of api's which needs to use same sanctum authentication with in the custom package routes
2
votes
2 answers

How Do I Write R Package Documentation When I Have More than One Function to Perform a Composite Task?

I have the following R functions which I want to use to obtain the sum, sum of squares and sum of cubes of any numeric vector: Functions Corrected ss <- function(x){ `%dopar%` <- foreach::`%dopar%` foreach::foreach(i = x, .combine = "+") %dopar%…
Daniel James
  • 1,381
  • 1
  • 10
  • 28
2
votes
1 answer

Installing rgl package in R Mac OS via R-CMD-check

One of the dependencies of my package is the rgl package. When I try to do a R-CMD-check via Github Actions with the config - {os: macOS-latest, r: 'release'} as set up via usethis::use_github_action_check_standard() I am running into a problem…
yasel
  • 433
  • 3
  • 13
2
votes
1 answer

devtools::check - System command 'Rcmd.exe' failed, exit stauts:1, stdout + stderr:

I am currently developing a package for my PhD containing functions for the data analysis for my project. The setup is windows 10 and all files are saved locally on the PC and synchronised to One Drive. I am able to build my package and was also…
ikempf
  • 153
  • 1
  • 10