It should be possible to use covr to do this, see this old issue
(https://github.com/r-lib/covr/issues/59). However interpreting the
results can prove challenging as naturally covr uses functions
from the base internally. Unfortunately the base and many of the
internal and recommended packages have
>From reading the discussion on the Bioconductor issue tracker it seems like
the reason the GC is not suspended for the non-string ALTREP Elt methods is
primarily due to performance concerns.
If this is the case perhaps an additional flag could be added to the
`R_set_altrep_*()` functions so ALTRE
One way to avoid the call to timedatectl is to set the `TZ` environment
variable on your machine to your local timezone, if this is set
`Sys.timezone()` uses this and does not try to query timedatectl for the
timezone.
This is a common issue as well in docker containers, as like on WSL in
docker t
It looks to me like internally .subset2 uses `get1index()`, but this
function is declared in Defn.h, which AFAIK is not part of the exported R
API.
Looking at the code for `get1index()` it looks like it just loops over the
(translated) names, so I guess I just do that [0].
[0]:
https://github.co
https://github.com/jimhester/archive was not allowed on CRAN when I
submitted it 3 years ago due to this restriction.
Being able to write custom connections is a useful feature for a number of
applications, I would love this policy to be reconsidered.
On Wed, May 6, 2020 at 10:30 PM Henrik Bengts
If you test a package with `R CMD check --as-cran` one of the
'incoming' checks is for a large version number, it gives a NOTE like
this
* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Jim Hester ’
Version contains large components (0.0.0.9000)
This is a useful
The fs[1] function `fs::path_abs()` does what I believe you were
expecting `normalizePath()` to do in this case. e.g.
setwd("~")
normalizePath("foo/bar")
#> Warning in normalizePath("foo/bar") :
#> path[1]="foo/bar": No such file or directory
#> [1] "foo/bar"
fs::path_abs(
A useful extension of ALTREP is having two new string methods which
return the number of characters of a given string element and to
return a substring of an element.
Having these methods would allow retrieving these values without
needing to create a CHARSXP for the full element data, which could
I just sent a PR that makes a few small changes to the package and
fixes the installation with `install_github()` (and also `R CMD
INSTALL`) and other ways of installing the package.
https://github.com/therneau/survival/pull/84
Jim
On Thu, Sep 5, 2019 at 1:53 PM Therneau, Terry M., Ph.D. via R-d
Martin,
Thank you for discussing this amongst R-core and for detailing the
R-core discussion here.
Some specific examples where having underscores available would have
been useful.
1. My primerTree package (2013) was originally primer_tree, but I had
to change the name to camelCase to comply wit
To be clear, I'd be happy to contribute code to make this work, with
the changes mentioned by Duncan and elsewhere in the codebase, if
someone on R-core was interested in reviewing it.
Jim
On Thu, Aug 8, 2019 at 11:05 AM Duncan Murdoch wrote:
>
> On 08/08/2019 10:31 a.m., Jim H
Are there technical reasons that package names cannot be snake case?
This seems to be enforced by `.standard_regexps()$valid_package_name`
which currently returns
"[[:alpha:]][[:alnum:].]*[[:alnum:]]"
Is there any technical reason this couldn't be altered to accept `_`
as well, e.g.
"[[:alp
First, thank you to Tomas for writing his recent post[0] on the R
developer blog. It raised important issues in interfacing R's C API
and C++ code.
However I do _not_ think the conclusion reached in the post is helpful
> don’t use C++ to interface with R
There are now more than 1,600 packages o
Conversely, what is the process to remove a package from core R? It seems
to me some (many?) of the packages included are there more out of
historical accident rather than any technical need to be in the core
distribution. Having them as a core (or recommended) package makes them
harder update inde
Looking at the code for `R CMD INSTALL` [1] it looks like
`--configure-args` is not used on Windows, so there is not a way to pass
arguments to the `configure.win` script like there is for `configure`.
Is this lack intentional or simply an oversight because support for
configure.win was added late
The R Installer by default installs both the 32 and 64 bit versions of
R. This can cause user confusion as they have multiple versions of R
installed and are then unsure which to use, or mistakenly open the
wrong version.
We can remove much of this ambiguity by changing the default choice in
the i
Assuming you are fine with a pairlist instead of a list avoiding the
`as.list()` call for dots2 saves a reasonable amount of time and makes it
clearly the fastest.
library(rlang)
dots1 <- function(...) as.list(substitute(list(...)))[-1L]
dots2 <- function(...) as.list(substitute(...()))
dots2.5 <
This change poses difficulties for automated build systems such as
travis-ci, which is widely used in the R community. In particular
because this is a WARNING and not a NOTE this causes all R-devel
builds with vignettes to fail, as the default settings fail the build
if R CMD check issues a WARNING
R does provide the addTaskCallback / taskCallbackManager to run a
callback function after every top level command. However there is not
an equivalent interface that would be run _before_ each command, which
would make it possible to time of top level calls and provide other
execution measurements.
On linux at least you can use `/dev/full` [1] to test writing to a full device.
> echo 'foo' > /dev/full
bash: echo: write error: No space left on device
Although that won't be a perfect test for this case where part of the
file is written successfully.
An alternative suggestion for test
In WRE [1] it states
> Several optional fields take logical values: these can be specified as ‘yes’,
> ‘true’, ‘no’ or ‘false’: capitalized values are also accepted.
And if you look at the source [2], [3] you will see exactly what
values this entails.
[1]:
https://cran.r-project.org/doc/manual
The relevant sections of the C standard are
http://c0x.coding-guidelines.com/5.2.4.2.1.html, which specifies that C
ints are only guaranteed to be 16 bits, C long ints at least 32 bits in
size, as Peter mentioned. Also http://c0x.coding-guidelines.com/6.4.4.1.html
specifies l or L as the suffix for
The HSIZE constant, which sets the size of the hash table used to
store symbols is currently defined as `#define HSIZE 4119`. This value
was last increased in r5182 on 1999-07-15.
https://github.com/jimhester/hashsize#readme contains a code which
simulates a normal R workflow by loading a handful
#x27;d propose coopting unary @ for that myself. After off list
> discussions with Jonathan Carrol and with Michael Lawrence I think it's
> doable, unambiguous, and even imo pretty intuitive for an "unquote"
> operator.
>
> Best,
> ~G
>
> On Fri, Mar 17,
pelled out stuff like %foo%), it's hard to
>> see the advantage vs. foo(x).
>>
>> Those examples you mention should probably be addressed (eventually) in the
>> core language, and it looks like people are already able to experiment, so
>> I'm not sure there'
might
> be found, does "a %chr% %chr% b" mean "%chr%(a, %chr% b)", or is it a syntax
> error (like typing "a %chr%(%chr%(b))" would be)?
>
> Duncan Murdoch
>
>
>
>
>
> On 16/03/2017 10:24 AM, Jim Hester wrote:
>>
>> R has long suppo
nyway.
>
> Best,
> ~G
>
>
>
> On Thu, Mar 16, 2017 at 9:51 AM, Martin Maechler
> wrote:
>>
>> >>>>> Jim Hester
>> >>>>> on Thu, 16 Mar 2017 12:31:56 -0400 writes:
>>
>> > Gabe,
>> > The unary fun
perations would be of the same precedence (or just slightly below?)
> built-in unary ones? So
>
> "100" %identical% %chr% 100
>
> would work and return TRUE under your patch?
>
> And with %num% <- as.numeric, then
>
> 1 + - %num% "5"
>
> woul
R has long supported user defined binary (infix) functions, defined
with `%fun%`. A one line change [1] to R's grammar allows users to
define unary (prefix) functions in the same manner.
`%chr%` <- function(x) as.character(x)
`%identical%` <- function(x, y) identical(x, y)
%chr% 100
Given the extremely simple package at
https://github.com/jimhester/testUnload, which includes only one S3 method
'print.object' the following code produces a lazy load error from a new R
session (R-devel r69801)
install.packages("testUnload", repos = NULL)
library("testUnload")
unloadNamespace("te
he branch of the parse tree, as Michael suggests.
>
> etc. Which is best for your purposes?
>
> Duncan Murdoch
>
>
>> Michael
>>
>> On Wed, Jul 29, 2015 at 9:43 AM, Duncan Murdoch
>> wrote:
>> > On 29/07/2015 12:13 PM, Jim Hester wrote:
>>
I would like to map the parsed tokens obtained from utils::getParseData()
to the parse tree and elements obtained by base::parse().
It looks like back when this code was in the parser package the parse()
function annotated the elements in the tree with their id, which would
allow you to perform th
y issue.
On Mon, May 11, 2015 at 12:28 PM, Jim Hester
wrote:
> Example input and output to reproduce this can be found at
> https://gist.github.com/jimhester/b7f05f50794c88e44b17.
>
> I tested this attempting to compile the [digest](
> http://cran.r-project.org/web/packages
Example input and output to reproduce this can be found at
https://gist.github.com/jimhester/b7f05f50794c88e44b17.
I tested this attempting to compile the [digest](
http://cran.r-project.org/web/packages/digest/index.html) package, `run.sh`
and `run.bat` were both run in the package source directo
34 matches
Mail list logo