Questions tagged [package-development]

73 questions
36
votes
1 answer

How to effectively deal with uncompressed saves during package check?

In recent efforts to develop a package, I'm including datasets in the data/ folder of my package. In my specific case I have 5 datasets all of which are in data.table format (although the issues I describe below persist if I keep them as…
Maiasaura
  • 32,226
  • 27
  • 104
  • 108
23
votes
2 answers

character(0) warnings when running devtools::load_all(".") in RStudio

I have an R package that I've been building in RStudio, let's called it my_pkg. When I run devtools::load_all(".") within RStudio (specifically using the Ctrl + Shift + L shortcut), I get the following message: Loading my_pkg Warning messages: 1:…
Brash Equilibrium
  • 1,357
  • 4
  • 14
  • 35
22
votes
2 answers

permission denied error while building/checking R package on WIndows

I tried to build the R package hyperSpec using Windows Vista. When I do so, I get the following error message: warning in file.copy(pkgname, Tdir, recursive = TRUE) Problem copying .\hyperSpec\data\barbiturates.rda to…
Marcel
  • 221
  • 1
  • 2
  • 4
22
votes
2 answers

Where to put package vignettes for CRAN submission?

From the Writing R Extensions Manual, I read that As from R 2.14.0 the preferred location for the Sweave sources is the subdirectory vignettes of the source packages, but for compatibility with earlier versions of R, vignette sources will be…
Gregor Thomas
  • 136,190
  • 20
  • 167
  • 294
11
votes
2 answers

how to suppress "S3 method overwritten" messages from being printed to user console

I have an R package called ggstatsplot (https://indrajeetpatil.github.io/ggstatsplot/) which relies on a collection of packages that share a few S3 methods between each other. Therefore, every time the package is loaded, the user is bombarded with…
Indrajeet Patil
  • 4,673
  • 2
  • 20
  • 51
11
votes
1 answer

Getting R CMD check to understand backslashes

I'm writing a package of functions I use all the time, one of which is basically a short wrapper for setdiff: "%\\%" <- function(A, B) setdiff(A, B) so 1:6 %\% 4:6 == 1:3. Documenting this seems to be a struggle. Here are the relevant parts of my…
MichaelChirico
  • 33,841
  • 14
  • 113
  • 198
7
votes
2 answers

How do I load data from another package from within my package

One of the functions in a package that I am developing uses a data set from the acs:: package (the fips.state object). I can load this data into my working environment via data(fips.state, package = "acs"), but I do not know the proper way to load…
itsMeInMiami
  • 2,324
  • 1
  • 13
  • 34
7
votes
2 answers

How can I automatically add/update Depends/Imports/Suggests versions in DESCRIPTION?

I like to keep my R packages up to date, and in developing my own package, I want to stick to @Hadley's advice: Generally, it’s always better to specify the version and to be conservative about which version to require. Unless you know otherwise,…
maxheld
  • 3,963
  • 2
  • 32
  • 51
7
votes
1 answer

pkgdown R package build_site function causes dependent packages unable to be loaded

I am using pkgdown package to generate the elegant and static manual page for R package (called RTCGA). When I run the code to produce the static documentation as website I use following commands > pkgdown::build_site() Initialising site…
Marcin
  • 7,834
  • 8
  • 52
  • 99
5
votes
3 answers

Building my unaltered package suddenly fails: for Vignettes and 'arch = x64'

Context I've been developing a proprietary package (call it "my_pkg") with vignettes, in RStudio with the latest version (4.1.1) of R. I'm working on a Lenovo ThinkPad with the following software sysname release version …
Greg
  • 3,054
  • 6
  • 27
5
votes
2 answers

Can my NPM CLI package be executed on CMD without installing globally?

I have written an NPM package which has its own CLI commands. Let's name that package as xyz and imagine it's now avaialable on npmjs.com So, let's say a user installs this package in his project by running npm install xyz. And now he wants to run a…
Tharindu Thisarasinghe
  • 3,846
  • 8
  • 39
  • 70
5
votes
0 answers

Package reverse dependency checks (especially on Windows)

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…
Helix123
  • 3,502
  • 2
  • 16
  • 36
5
votes
3 answers

Bioconductor packages Not Installing with biocViews specification in Description section of Package

Problem: I am developing an R package and one of the dependent packages is multtest. It's only available on Bioconductor as here. I am using devtools to build the package. And, when I run devtools::install() on R console, I would like multtest to…
Zarni
  • 109
  • 6
5
votes
1 answer

how to create npm package with a demo app?

It seems good practice for packages to provide some type of demo app, so I'm just wondering what's the cleanest way to organize the file structure? I want to have one github repo that contains my published NPM module and a simple demo webapp.…
dcsan
  • 11,333
  • 15
  • 77
  • 118
5
votes
4 answers

Extending Laravel 5.5/5.6 Blueprint

How to extend Laravel 5.5/5.6 MySQL Blueprint with custom method $table->myMethod() like pre-built method $table->timestamps();? I have tried an example with SQLlite: Extending Blueprint for SQLite in Laravel 5 But I couldn't get it work. I am…
1
2 3 4 5