Questions tagged [r-usethis]
35 questions
14
votes
1 answer
Github Action failing: Process completed with exit code 1 when installing system dependencies for R-CMD-Check
I am trying to run the use_github_action_check_standard() command from the usethis R package to check my package on every push on GitHub Actions.
The test works without a problem on Windows and MacOS, but for both Linux versions my workflow code…

Moritz Schwarz
- 2,019
- 2
- 15
- 33
7
votes
1 answer
How to submit an R package to CRAN via GitHub Actions?
I've created an R package and I'd like to upload it to CRAN via GitHub Actions whenever I merge changes into the master branch. I've found a lot of examples of R actions and I've even looked up how some of the most popular packages like dplyr do it…

IVR
- 1,718
- 2
- 23
- 41
4
votes
1 answer
R devtools: use local dependencies
I want to add a local package dependency using R devtools.
The suggested way to add packages to the package DESCRIPTION file is one of the two functions use_package() and use_dev_package(), from the usethis package. The latter adds a dependency on…

antonio
- 10,629
- 13
- 68
- 136
3
votes
1 answer
Can't get Github PAT to persist - RStudio & Ubuntu 20
I'm using RStudio + Github and have been following the instructions here: https://happygitwithr.com/https-pat.html
It works great, except that within a couple of hours the PAT no longer works and I'm prompted to enter a username/password. I go back…

myfatson
- 354
- 2
- 14
2
votes
2 answers
Undo `usethis::use_XYZ()`
I'm developing a package in RStudio with usethis, trying to make use of best practices. Previously, I had run usethis::use_tidy_eval(). Now, I'm using data.table, and set this up by running usethis::use_data_table(). I get a warning,
Warning…

Jollywatt
- 1,382
- 2
- 12
- 31
2
votes
1 answer
R: usethis: push to Github on an already created repository
I am trying to push to Github on an already created repository.
I use usethis to clone a Repo, and now I wanna update and push some new files, lamentably I have some error: Repo already exists, but my goal is push only new files. I tried literally…

Rodrigo Badilla
- 141
- 7
2
votes
0 answers
How can I use magrittr pipe (%>%) in my package?
I am trying to create a package ("packagename") to host some custom R functions and R markdown templates. I am trying to use magrittr pipe in one of the functions in it. For this, I am using
usethis::use_pipe()
function. However, when I try to…

Eva
- 663
- 5
- 13
2
votes
0 answers
R package build check warning about "scales"
I am building an R package, and I am constantly getting this warning about "scales" (below). I scanned my entire code, but I can't figure out where the problem is. Any suggestions would be helpful. Thanks!
> checking dependencies in R code ...…

Rohit Farmer
- 319
- 4
- 15
2
votes
1 answer
pkgdown::build_site() not capturing R package logo in HTML renders
I recently got a new laptop with Windows 11 (despite my sessionInfo() stating Windows 10) and I'm trying to build a pkgdown site for an R package that I'm developing. This is not an issue that I have encountered in the past. Running the command…

Javier Orraca-Deatcu
- 171
- 1
- 9
2
votes
1 answer
How can I use usethis to increase version of my R package on google cloud platform?
I'm trying to increase the version of my package an R session on google cloud platform. I think I must be missing something because I thought when which was set that the code should be able to run without further user input.
rlang::is_interactive()…

JCran
- 375
- 2
- 14
1
vote
1 answer
Cannot get Git tab to show up in RStudio
I've looked through a bunch of links so far, but so far none of them seems to solve my issue with installing the usethis package or getting my Git tab to work in R. For context, my session_info is below and I have just downloaded R and RStudio…

Shawn Hemelstrand
- 2,676
- 4
- 17
- 30
1
vote
0 answers
Setting up GH actions in a subdirectory (several packages in one repo)
When writing R packages, I prefer to set up CI with usethis::use_github_actions(), which creates a .github/ directory in the root, where GH action jobs are designed to run: https://stackoverflow.com/a/72268873/8400969.
I have a legacy repo that…

Michael Roswell
- 1,300
- 12
- 31
1
vote
0 answers
How to handle a private remote dependency in a new R package?
I am writing an R package (let's called it new.package) that needs to import functions from another private R package (let's called it remote.private.package). remote.private.package is a private package on a github private remote repository (let's…

trevi
- 589
- 1
- 6
- 11
1
vote
1 answer
R - %||% pipe operator
I'm trying to reuse snippets of code from the r-lib repository. I can't find where this particular pipe operator is defined:
getOption("usethis.description") %||% list()
Could anyone direct me to the source code for this pipe operator?

Dylan Russell
- 936
- 1
- 10
- 29
1
vote
1 answer
large files in R package - add to .Rbuildignore?
I have a function that takes a while to run in one of my packages. It only gets called when building vignettes, so to save on build time I stored the output to the package's internal data with usethis::use_data(). The file saved to R/sysdata.rda and…

Mark Rieke
- 306
- 3
- 13