Michael Chirico
Michael Chirico
Copying from the dbplyr vignette: ```r library(dplyr) con
Here, the resulting `cpp11` file is hard-coded to have extension .cpp: https://github.com/r-lib/cpp11/blob/df6d0eae400733efec1ebd92b5cf72f0a6c90264/R/register.R#L41 But sometimes we may need to write .cc extensions (e.g. if the other source files are also written...
I'm seeing an error where cbind() wounds up run without .Random.seed set, which this solves. Per `?.Random.seed`, no seed is set initially in the session until the first time `set.seed()`...
Test assumes behavior new to R4.0.0 (namely, that `class(matrix())` is `c("matrix", "array")`). It's better to use `is.matrix()` instead.
Closes #1423 Implementation as of now has a few design choices, happy to adapt as seen fit: * Added the function to `R/expect-length.R` since it fits so nicely alongside `expect_length()`,...
`testthat::expect_length()` is convenient for testing the size of vectors. A natural extension would seem to be similar expectations for `data.frame`s/matrices/arrays, where expectations like ``` expect_nrow(filter(DF), 10L) expect_ncol(transform(DF), 5L) expect_dim(transformation(array), c(1L,...
More direct & should be more readable (not clear if the upstream rlang issue is still a blocker)
I think it makes sense to offer a generalized version of `single_quotes_linter()` that allows users to choose `'` as their preferred quoting character. Of course `"` should be the default.
e.g. this suite can be replaced by `expect_lint()` tests: https://github.com/r-lib/lintr/blob/bed54c55523e96f7c89154ae31702cd74bb209d8/tests/testthat/test-implicit_integer_linter.R#L2-L35 Here's a list of tests using `:::`, generated with `grep -Flr ":::" tests/testthat | awk -F/ '{print "- [ ]...
A handy parameter for `single_quotes_linter()` would throw a lint on literals that use `"` but have escaped `"` that could be avoided by using `'` instead: ```r "a string" #...