Questions tagged [devtools]

An R package containing tools to ease the task of software development.

devtools is an package to make it easier to create and release other R packages. For non-package developers, it also contains functions for getting R packages from online repositories including , and .

Repositories

Books

Other resources

Related tags

1529 questions
29
votes
7 answers

Installing an R package from local unzipped folder

I am having difficulty installing an unzipped package on a Windows 7 computer without administrative privileges and no internet access. I am using the RGui (not RStudio). Right now I have an unzipped library sitting in a directory. Unfortunately,…
Phantom Photon
  • 768
  • 2
  • 10
  • 20
29
votes
2 answers

The correct use of devtools and/or RStudio with respect to .Rbuildignore

I'd like to exclude the following ressources when building an R package via .Rbuildignore: ^.*\.Rproj$ ^\.Rproj\.user$ inst/examples inst/prof man-roxygen tests But I'm confused as sometimes it seems to work and sometimes it doesn't. I'm guessing…
Rappster
  • 12,762
  • 7
  • 71
  • 120
28
votes
14 answers

'data' is not an exported object from 'namespace:my_package'

I'm writing a function that uses an external data as follow: First, it checks if the data is in the data/ folder, if it is not, it creates the data/ folder and then downloads the file from github; If the data is already in the data/ folder, it reads…
Igor
  • 913
  • 1
  • 8
  • 18
26
votes
2 answers

Building a package with devtools - throwing an error where "Author" and "Maintainer" fields are missing/empty despite being filled

In my DESCRIPTION file I have used the AUTHORS@R syntax to generate the Author and Maintainer fields, but in the R CMD Check process it keeps throwing an error message saying the fields are empty: > checking for file 'bar/DESCRIPTION' ... ERROR …
Nautica
  • 2,004
  • 1
  • 12
  • 35
26
votes
3 answers

update packages installed from github

I'm using more and more dev packages installed from github. I find myself wondering if there is an easy way to update these packages? Essentially looking for something like update.packages() equivalent for install_github() (or indeed any other…
carnust
  • 611
  • 1
  • 8
  • 10
25
votes
5 answers

Why does Chrome DevTools show multiple garbled versions of my source code for my Vue application?

I have a Vue application and I'm trying to debug it in Chrome DevTools. The problem is when I try to find the file I want to debug, I get a list of files with the same name plus some weird hash tacked onto the end: When I open any one file, I get…
gib65
  • 1,709
  • 3
  • 24
  • 58
25
votes
1 answer

How to use @inheritParams on single parameters when multiple parameters match?

I would like to document an R function and inherit individual parameter documentation from other functions when multiple parameter names match. For example, lets say I have the following 2 functions. #' Function 1. #' #' Description of function…
stat_student
  • 787
  • 10
  • 17
24
votes
1 answer

R: checking for non-standard things in the check directory ... NOTE Found the following files/directories

This is the error I get after running devtools::check_rhub() checking for non-standard things in the check directory ... NOTE Found the following files/directories: 'disk.frame-Ex_i386.Rout' 'disk.frame-Ex_x64.Rout' 'examples_i386' …
xiaodai
  • 14,889
  • 18
  • 76
  • 140
24
votes
7 answers

R devtools fails as "Package libxml-2.0 was not found in the pkg-config search path"

I am trying to install devtools in R version 3.2.1, however when I do the following error is thrown: Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing libxml-2.0.pc to the PKG_CONFIG_PATH…
mattbawn
  • 1,358
  • 2
  • 13
  • 33
24
votes
7 answers

R package build Undocumented code objects

I have written an R package for integrating with electronic medical records. I think I have correctly added the imports and dependencies in the DESCRIPTION file and documented everything via roxygen2, but on three of my functions (which are all in…
dspringate
  • 1,805
  • 2
  • 13
  • 20
24
votes
4 answers

How to export S3 method so it is available in namespace?

I am creating a package and for S3 methods I export them using ##' @method predict myclass ##' @export predict.myclass <- function(object,...) { } Now when I load the package, then predict works on object of the class myclass, but function…
mpiktas
  • 11,258
  • 7
  • 44
  • 57
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
23
votes
1 answer

R data.table breaks in exported functions

I'm having a problem getting data.table to work in roxygen2 exported functions. Here's a simple, fake function in a file called foo.R (located in the R directory of my package) which uses data.table: #' Data.table test function #' @export foo <-…
kjmij
  • 512
  • 1
  • 4
  • 11
22
votes
1 answer

devtools::test() works but devtools::check() doesn't. Why?

I'm testing this R package. The following three things work just fine: devtools::test() devtools::test_file("tests/testthat.R") Travis-CI with release version of R However, the following things devtools::check() devtools::build_win() # (see…
beanumber
  • 767
  • 5
  • 13
22
votes
13 answers

Is Git ready to be recommended to my boss?

I want to recomment Git to my boss as a new source control system, since we're stuck in the 90s with VSS (ouch), but are the tools and 3rd party support good enough yet? Specifically I'm talking about GUI front-ends similar to TortoiseSVN, decent…
Mike Weller
  • 45,401
  • 15
  • 131
  • 151