rcmdcheck | Run R CMD check from R and collect the results | Development Tools library
kandi X-RAY | rcmdcheck Summary
kandi X-RAY | rcmdcheck Summary
Run R CMD check from R and Capture Results.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rcmdcheck
rcmdcheck Key Features
rcmdcheck Examples and Code Snippets
Community Discussions
Trending Discussions on rcmdcheck
QUESTION
I recently created this post trying to figure out how to reference GitHub Secrets in a GitHub action. I believe I got that solved & figured out and I'm onto a different issue.
Below is a sample of the workflow code as of right now, the issue I need help with is the Create and populate .Renviron file
part.
ANSWER
Answered 2021-Sep-01 at 09:23The file is there where you expect to be
QUESTION
I'm running R CMD CHECK via a Github action for the package I'm currently writing. It is ran on a Mac platform which does not have an OpenGL device, so R CMD CHECK fails because I run the rgl package in the examples. I think this will not be a problem for CRAN when I'll submit the package, I believe the CRAN platforms all have an OpenGL device, but I would like that R CMD CHECK works with the Github action. How could one detect whether there's an OpenGL device? If this is possible, I would change my examples to
...ANSWER
Answered 2021-Dec-27 at 20:31I think it's hard to do what you want, because there are several ways rgl
initialization can fail: you may not have X11 available, X11 may not support OpenGL on the display you have configured, etc.
If you are always running tests on the same machine, you can probably figure out where it fails and detect that in some other way, but it's easier to tell rgl
not to attempt to use OpenGL before loading it.
For testing, the easiest way to do this is to set an environment variable RGL_USE_NULL=TRUE
before running R, or from within R before attempting to load rgl
. Within an R session you can use options(rgl.useNULL = TRUE)
before loading rgl
for the same result.
When rgl
is not using OpenGL you can still produce displays in a browser using rglwidget()
, and there are ways for displays to be updated automatically, which might be useful in RStudio or similar GUIs: use options(rgl.printRglwidget = TRUE, rgl.useNULL = TRUE)
.
QUESTION
I have been trying to start using github actions for continuous integrations in my packages, however,even though I am using the premade functions of usethis package it is not working, and the runners stop immediately.
I have tried with the following functions:
...ANSWER
Answered 2021-Sep-15 at 12:02Notice this part in error message:
QUESTION
Hi I'm just about finished up using GitHub actions to add CI / CD steps to deploy an R Shiny app I have. The problem I'm having is there is a file in R called .Renviron
that I use to store credentials to access a SQL DB of mine in the R script. Normally I deploy my app locally and this file is included when I use the rsconnect package, but now that I'm using GitHub actions I believe I have to make this .Renviron file manually myself in a bash script step.
Below is what my github workflow code looks like as of right now. The problem I'm having issues with is the Create and populate .Renviron file
part.
ANSWER
Answered 2021-Aug-30 at 08:08You are correct, you can't use ${{ secrets.my_secret }}
in the bash scripts.
That won’t work, because “${{ }}” and the “secrets” variable are GitHub Actions constructs that Bash doesn’t understand. You’ll have to pass the secret to your step as an environment variable:
However, you may also use env mapping like you have in your last step. It would be like this:
QUESTION
I am trying to get Github Action to check my package. The packages compiles fine (not even a note) on my computer. I created a yaml script to go into the github workflow directory using usethis::use_github_action_check_standard()
but it fails with a bunch of warnings like
No files were found with the provided path: check. No artifacts will be uploaded.
The path check is a temporary directory created by rcmdcheck
for storing files. So, I presume it is a problem connected with this command. But everything was created by the usethis utility and nobody else seems to have the same problem.
I looked around a lot and the last fix I tried was to manually add a step to install imported and suggested packages, as suggested in this post, to no avail.
What am I doing wrong? Thanks in advance.
the yaml script is
...ANSWER
Answered 2021-Mar-07 at 08:33I solved the problem by moving everything to the main branch.
QUESTION
I would like to use Sys.getenv()
to retrieve an environment variable.
Locally, I'm able to save a .Renviron
file in my working directory that has the variables in it. These load perfectly fine and tests pass.
The repository is here for reference: https://github.com/Stoltzman-Consulting/githubActionsR
However, due to the fact there are secrets stored, I cannot upload this file into my repository. I have created secrets in the GitHub secrets section:
My tests are as follows:
...ANSWER
Answered 2021-Feb-04 at 22:29One solution that works, create ~/.Renviron
within a block
QUESTION
I'm not sure how best to describe this, hence the rather vague title.
I have an R package that uses Github Actions to run checks. You can see the workflow file here:
https://github.com/Azure/Microsoft365R/blob/master/.github/workflows/check-standard.yaml
It's basically the same as the check-standard workflow in the r-lib/actions repo, with some tweaks for my particular requirements. My latest commit is failing the check for the MacOS build, with this error:
...ANSWER
Answered 2021-Jan-12 at 19:30You're using actions/cache
to cache your R libs. By this you're restoring a cache that might be invalid if your key
and the restore-keys
isn't set up properly.
At the moment, there is no direct way to manually clear the cache. For some other options you can check Clear cache in GitHub Actions.
QUESTION
I am using GitHub actions for CI of my R package. I am trying using both testthat
and shinytest
in my package. I have the package structure set up correctly according to the shinytest
documentation. When I run R-CMD-CHECK
in RStudio, my package (including both testthat
and shinytest
testing works).
My GitHub Actions .yaml
workflow is:
ANSWER
Answered 2020-Oct-29 at 14:57It's hard to investigate the issue without detailed logs and no information about what dependencies (remotes
) are being installed in Query dependencies
step. It seems the PhantomJS dependency is not being installed at all. The workflow succeeds on ubuntu-20.04
because the runner has PhantomJS installed out-of-the-box. You can see all the installed software on provided runner types here. The other runner types used in the workflow above (windows-latest
and macOS-latest
) are missing PhantomJS. That's why your workflow fails on Windows and MacOS but succeeds on Ubuntu.
QUESTION
data.frame(a=1:20) %>%
dplyr::mutate(x = ifelse(a <= 10 & a > 0, 10, a)) %>%
dplyr::mutate(y = unlist(x) / sum(unlist(x)))
...ANSWER
Answered 2020-Sep-14 at 04:49A few ways to mitigate this:
- Add
utils::globalVariables(c("a","x"))
somewhere within your package's.R
files. Not within a function, this call needs to happen when the files are sourced (e.g., during checks).
Or referencing https://dplyr.tidyverse.org/articles/programming.html#eliminating-r-cmd-check-notes-1,
use
.data$
:
QUESTION
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 fails before it even gets to the package code.
It fails when it tries to install the system dependencies where it gives me the error ##[error]Process completed with exit code 1
.
When I look at the raw logs (below), I notice the line:
Cache not found for input keys: Linux-287c850eb370edd647ed85b6fac18cbaee02effa7d01b981304dce84a452b22c-1-, Linux--1-.
But I'm afraid I don't understand that error. Also I don't think this is it, because the key appears in the group above (notice the ##[endgroup]
) already but the error only appears in the next group (as on the Screenshot).
Any ideas? Many thanks!
I also post my entire workflow code below.
Screenshot Raw Log ...ANSWER
Answered 2020-Aug-16 at 22:56I figured it out in the end but will leave this here, as it might be useful for someone else!
The error was associated with the R code that was in the command:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rcmdcheck
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page