Questions tagged [r-package]

This tag should be used for questions regarding the development of R packages. Do not use this tag to ask questions about the use of R packages. Many common R packages have their own tags for that purpose.

This tag should be used for questions regarding the development of R packages. Do not use this tag to ask questions about the use of R packages. Many common R packages have their own tags for that purpose.

The R Core Team defines a package in the Manual on Writing R Extensions:

A package is a directory of files which extend R, a source package (the master files of a package), or a tarball containing the files of a source package, or an installed package, the result of running R CMD INSTALL on a source package. On some platforms (notably OS X and Windows) there are also binary packages, a zip file or tarball containing the files of an installed package which can be unpacked rather than installing from sources.

1279 questions
0
votes
1 answer

How to change the per-step weighting coefficient in the R package DTW

I would like to change the default step-pattern weight of the cost function because I need to standardize my results with some others in a paper that doesn't use the weight 2 for the diagonal distance. I've read the JSS paper but I just found other…
gissemari
  • 11
  • 2
0
votes
1 answer

How can I find where the package I loaded comes from

I want to programatically save some packages my script has loaded (I mean the actual directory). I know doing .libPaths() shows the paths where the packages can come from (though I could also load it from somewhere different). Is there an already…
statquant
  • 13,672
  • 21
  • 91
  • 162
0
votes
1 answer

Allowing user to change R package global variable

I want to make an R package called my_package with the following with the following behavior: library(my_package) my_package::get_username() # should throw error "no username set" my_package::set_username("john doe") my_package::get_username() #…
latorrefabian
  • 1,077
  • 3
  • 9
  • 19
0
votes
0 answers

Cannot check my R package correctly

I have a own r package that works well. However when I check it, R delete me the export(predict.acb) on the NAMESPACE file. In my .R file I have: #' @export acb<-function(Class,data,lambda,distance=NULL,prior=NULL,info.pred=NULL) #'…
Oriol Prat
  • 1,017
  • 1
  • 11
  • 19
0
votes
0 answers

devtools::build and devtools::check bottleneck - Cannot bundle package

Hopefully someone can help me understand the process which is causing this bottleneck. I'm building an R package using packrat (I don't believe packrat is the issue, but I've only run into this problem since installing it). When I try to build the…
nev
  • 297
  • 3
  • 13
0
votes
1 answer

Googleway timeout

I'm having trouble with the googleway package in R. I am attempting to get driving distance for 159,000 records. I am using a paid google cloud account and have set all quotas as unlimited. I've attempted to use server keys and browser keys. After…
Clancy Birrell
  • 111
  • 1
  • 9
0
votes
3 answers

Performing simple lookup using 2 data frames in R

In R, I have two data frames A & B as follows- Data-Frame A: Name Age City Gender Income Company ... JXX 21 Chicago M 20K XYZ ... CXX 25 NewYork M 30K PQR ... CXX …
Anwar Shaikh
  • 1,591
  • 3
  • 22
  • 43
0
votes
0 answers

R Recompiling documentation & package unload results in lazy-load error

I'm using Roxygen2 to document my R (3.2.4) package and have several windows open as I fix my function @examples: 1) R session where I type devtools::document() to update the Rd file 2) terminal window where I reinstall the package with the updated…
0
votes
0 answers

Most efficient technique to build a series of R vignettes, with one for each example data set?

We are building an r package to assess income inequality in survey data https://github.com/DjalmaPessoa/convey I have about ten different public use microdata sets here - https://github.com/ajdamico/asdfree - that I would like to provide usage…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
0
votes
0 answers

can I know which versions of Rstudio and r is compatible for package "rmaps"

When I tried to use install r package 'Rmaps' I got this warning install.packages("rmaps") Installing package into ‘C:/Users/Anjana/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘rmaps’ is…
rbeginner
  • 43
  • 5
0
votes
0 answers

Error in eval(expr, envir, enclos) : could not find function ".getNamespace" and unable to load R code in package

I have a package 'My_Package' in this path /proj/users/Rbud/packrat/lib/x86_64-pc-linux-gnu/3.2.3/My_Package I am trying to exectute an Rscript by scheduling a cronjob. Each time cronjob runs I get the following error Error in eval(expr,…
R Bud
  • 261
  • 1
  • 4
  • 16
0
votes
1 answer

R 3.2.3 devtools::install_version() fails (.zip file not found)

I'm trying to leave instructions for how to set up an R environment as similar as possible to mine on Windows. I found this stackoverflow thread, which was really helpful: Installing older version of R package I can get most packages to work using…
GregF
  • 1,292
  • 11
  • 14
0
votes
1 answer

Having trouble in building Rpackage using R/C++ functions

I have a C++ function that is called inside an R function using Rcpp packgae. The R function accepts an inputDataFrame and uses the C++ function (also accepts a DataFrame) to calculate drug amounts (A1) as a function with time. R then returns the…
Amer
  • 2,131
  • 3
  • 23
  • 38
0
votes
1 answer

Upgraded R to 3.2.4 and I want Revolution R enterprise's functions back

I installed the latest version of R 3.2.4 and I used to run the RRE version of R (based on R 3.2.1). I want to ask if there is anything I can do to make the RRE functions run on a R 3.2.4 ?
0
votes
0 answers

Installing local package on R 3.2.2 failed

Installing an old version of caret on my custom R version was a burden. I tried using the RStudio installation tool, but failed I tried the command: pathToFile <- "C:/Users/Fsociety/Desktop/caret_5.17-7.tar" install.packages(pathToFile,repos =…