i just set up R to work with Jupyter notebooks in vscode but it is marking the first string of my kernels in red.
The message I get is:
Failed to run diagnostics: ! error in callr subprocess
Caused by error:
! Full file exclusions must be…
Jim Hester's "lintr" package contains many different linters for R. The README for the package describes one of the linters in this way:
undesirable_function_linter: report the use of undesirable functions, e.g. options or sapply and suggest an…
This test in my package works fine with devtools::test(). Also the online Travis build is going well.
test_that("Package style", {
lintr::expect_lint_free()
})
However, with devtools::check() it fails.
The error message is
invalid 'path'…
I'm trying to customize the linter settings in VSCode for R but I'm a little confused.
I've checked just about every source available, from SO questions to the lintr package vingette, but I'm stumbling on an issue. It could be that since I'm not a…
When I run devtools::check(), my build is noting my .lintr (located in the root directory) as being a hidden file most likely included in error. Is there anyway to prevent this from being noted on a check? It was not included in error, I need it to…
The R package lintr checks files for "lint" (errors or style violations). It can be configured with a .lintr file. Where can that file be located? I was hoping to put it at the top of my git repo, but that doesn't seem to be working when I run in…
Let's say I have a function in my package
my_fn <- function() {
mtcars_dt <- data.table::data.table(mtcars)
mtcars_dt[, mpg_div_hp := mpg / hp]
mtcars_dt
}
In my .Renviron I have the setting…
I'm sure that this is a misunderstanding of mine, since I'm not really an R programmer...
I have my code here: https://gist.github.com/bnsh/3839c4eb2c6b31e32c39ec312014b2b8
#! /usr/bin/env Rscript
library(R6)
Cloaked <- R6::R6Class("Cloaked",
…
I've been writing an R package and using lintr to tidy it up stylistically.
One problem I am seeing a lot is that my data.frame columns are named from the CSV and are capitalised, e.g. MyVariableName. This is outside my control and outputted data…
Is it possible to generate SQALE rating (or Maintainability Rating in sonarqube speak) out of the lintr result or is there any other tool to do this for the R language?
I'm working with R in VS Code, using the R Extension. I do almost all of my project work using targets, which means that my package imports and functions are usually in separate files.
A simple example would be working in a folder which looks…
I would like to add non failing lintr checks to my (TravisCI-based) CI via tic.
(Initially I implemented the testthat approach but it is too bothersome for development.)
The lintr documentation provides an example for .travis.yml
after_success:
-…
When running lintr on an R function that uses data.table I get the following warning:
warning: no visible global function definition for '.', Did you mean '-'?
I thought an easy fix would be adding importFrom data.table .. I also tried quoting…
As the title says...
I've installed the R extension for VSC. Every time I save an .R file in VSC, I get a popup that says lintr is not installed (it most certainly is; I've been using it). If click the install button the terminal confirms that lintr…