Re: [Rd] R test coverage

2023-11-27 Thread Jim Hester
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

Re: [Rd] [External] Possible ALTREP bug

2021-05-28 Thread Jim Hester
>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

Re: [Rd] Sys.timezone() fails on Linux under Microsoft WSL

2021-04-26 Thread Jim Hester
timedatectl is present, but non-functional. Jim On Tue, Apr 13, 2021 at 9:19 AM Brenton Wiernik wrote: > In Microsoft’s Windows Subsystem for Linux (WSL or WSL2), there is not > system framework, so utilities that depend on it fail. This includes > timedatectl which R uses in Sys.timezo

Re: [Rd] subset data.frame at C level

2020-06-23 Thread Jim Hester
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

Re: [Rd] defining r audio connections

2020-05-07 Thread Jim Hester
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

[Rd] Add a new environment variable switch for the 'large version' check

2020-04-15 Thread Jim Hester
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

Re: [Rd] Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path

2020-04-15 Thread Jim Hester
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(

[Rd] ALTREP string methods for substr and nchar

2019-12-19 Thread Jim Hester
chromosome in memory. I realize there are tools in Bioconductor to handle this particular case, but it seems the general case would be perfect for ALTREP. Jim __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] install_github and survival

2019-09-09 Thread Jim Hester
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

Re: [Rd] Underscores in package names

2019-08-15 Thread Jim Hester
en et. al. [2]). Thanks again for the public discussion, Jim [1]: https://twitter.com/_ColinFay/status/1105579764797108230 [2]: https://osf.io/preprints/socarxiv/ts2wq/ On Wed, Aug 14, 2019 at 5:16 AM Martin Maechler wrote: > > >>>>> Duncan Murdoch > >>>>>

Re: [Rd] Underscores in package names

2019-08-09 Thread Jim Hester
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

[Rd] Underscores in package names

2019-08-08 Thread Jim Hester
_` as well, e.g. "[[:alpha:]][[:alnum:]._]*[[:alnum:]]" I realize that historically `_` has not always been valid in variable names, but this has now been acceptable for 15+ years (since R 1.9.0 I believe). Might we also allow underscores for package names? Jim ___

[Rd] Use of C++ in Packages

2019-03-29 Thread Jim Hester
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

Re: [Rd] Package inclusion in R core implementation

2019-03-04 Thread Jim Hester
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

[Rd] Using `--configure.args` with configure.win on Windows

2018-12-20 Thread Jim Hester
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

[Rd] Change windows installer default to only install 64 bit R

2018-11-09 Thread Jim Hester
your consideration, Jim Index: src/gnuwin32/installer/types3264.iss === --- src/gnuwin32/installer/types3264.iss (revision 75569) +++ src/gnuwin32/installer/types3264.iss (working copy) @@ -1,8 +1,8 @@ [Types] +Name: "u

Re: [Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-15 Thread Jim Hester
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 <

Re: [Rd] R CMD build then check fails on R-devel due to serialization version

2018-01-11 Thread Jim Hester
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

Re: [Rd] Wish List: base::source() + Add Execution Time Argument

2017-12-21 Thread Jim Hester
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.

Re: [Rd] write.csv

2017-07-04 Thread Jim Hester
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

Re: [Rd] The ByteCompile & LazyLoading fields

2017-07-04 Thread Jim Hester
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

Re: [Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?

2017-06-16 Thread Jim Hester
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

[Rd] Consider increasing the size of HSIZE

2017-05-16 Thread Jim Hester
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

Re: [Rd] Support for user defined unary functions

2017-03-17 Thread Jim Hester
ackage authors the power to experiment can produce beneficial ideas for the community. On Fri, Mar 17, 2017 at 9:46 AM, Gabriel Becker wrote: > Jim, > > One more note about precedence. It prevents a solution like the one you > proposed from solving all of the problems you cited. By my re

Re: [Rd] Support for user defined unary functions

2017-03-17 Thread Jim Hester
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'

Re: [Rd] Support for user defined unary functions

2017-03-17 Thread Jim Hester
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

Re: [Rd] Support for user defined unary functions

2017-03-16 Thread Jim Hester
, Mar 16, 2017 at 1:04 PM, Gabriel Becker wrote: > Martin, > > Jim can speak directly to his motivations; I don't claim to be able to do > so. That said, I suspect this is related to a conversation on twitter about > wanting an infix "unquote" operator in the context of

Re: [Rd] Support for user defined unary functions

2017-03-16 Thread Jim Hester
s.numeric quote(1 + - %num% "5") #> 1 + -(`%num%`("5")) 1 + - %num% "5" #> [1] -4 Jim On Thu, Mar 16, 2017 at 12:01 PM, Gabriel Becker wrote: > Jim, > > This seems cool. Thanks for proposing it. To be concrete, he user-defined > unary o

[Rd] Support for user defined unary functions

2017-03-16 Thread Jim Hester
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

Re: [Rd] summary.default rounding on numeric seems inconsistent with other R behaviors

2016-08-19 Thread Jim Porzak
> confusing to new users). > > > > --- > John Mount > http://www.win-vector.com/ <http://www.win-vector.com/> > Our book: Practical Data Science with R http://www.manning.com/zumel/ < > http://www.manning.com/zumel/> > > > > >

[Rd] unloadNamespace() does not address unevaluated promises in the S3 Methods Table

2015-12-22 Thread Jim Hester
quot;.__S3MethodsTable__.", envir = baseenv())) install.packages("testUnload", repos = NULL) library("testUnload") In my opinion, once the namespace is unloaded the corresponding entries should be removed in the S3 Methods Table by default. If others agree with this asses

Re: [Rd] Mapping parse tree elements to tokens

2015-07-29 Thread Jim Hester
whole function would have to be removed if a different parsing method was used. Regardless I am glad others have shown some interest in this issue, thank you for taking the time to read and respond! Jim On Wed, Jul 29, 2015 at 2:47 PM, Duncan Murdoch wrote: > On 29/07/2015 2:30 PM, Michael Lawren

[Rd] Mapping parse tree elements to tokens

2015-07-29 Thread Jim Hester
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

Re: [Rd] LDFLAGS defined in R_MAKEVARS_USER file is ignored for R CMD SHLIB on Windows

2015-05-13 Thread Jim Hester
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

[Rd] LDFLAGS defined in R_MAKEVARS_USER file is ignored for R CMD SHLIB on Windows

2015-05-11 Thread Jim Hester
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

Re: [Rd] [R] Internalization of help pages

2013-08-05 Thread Jim Lemon
ost of the people to speak English all of the time (pace Abraham Lincoln) remains the optimal solution. Jim __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] read.csv behaviour

2011-09-28 Thread Jim Lemon
test.csv") and to get the original object back, use: readLines("test.csv") The reason you can't use read.csv is that it returns a data frame, and that object can't have elements of unequal length. If you want an object with elements of unequal length, try: as.list(readLines("test.csv")) Jim __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] difficulties with setMethod("[" and ...

2010-05-18 Thread Jim Bullard
On Tue, 18 May 2010 10:22:03 +0200, Martin Maechler wrote: >>>>>> Tony Plate >>>>>> on Mon, 17 May 2010 20:51:12 -0600 writes: > > > Jim, yes, I have dealt with that particular challenge that list(...) > > throws an error

[Rd] performance of vector subscripting via character index

2009-09-07 Thread Jim Regetz
f direct character indexing is a serviceable workaround ... is it in fact the recommended approach in this case? Thanks, Jim -- James Regetz, Ph.D. Scientific Programmer/Analyst National Center for Ecological Analysis & Synthesis 735 State S

[Rd] obstacles to using vectors with attributes

2008-04-15 Thread Jim Regetz
t fully solve our particular problem. On that note, I don't suppose there's hope of revisiting the definition of is.vector itself? Bear in mind, I do appreciate that there are good reasons for its current behavior, and compatibility constraints on changing it. Thanks, Jim ---

Re: [Rd] Problems initializing an extended S4 class

2008-03-03 Thread Jim Regetz
Hi Martin, Many thanks for the reply, that really helps a lot. Some follow-up observations below. Martin Morgan wrote: > Hi Jim -- > > I think your problems have to do with the way 'initialize' and > 'validObject' work together. At some point in it's code,

[Rd] Problems initializing an extended S4 class

2008-02-28 Thread Jim Regetz
ntiate B using a valid A object? Hopefully I've just got something wrong in the formals for my initialize methods or in my use of getNextMethod(), but I've had no luck trying some alternatives -- and ultimately I'd prefer to better understand the underlying behavior rather than stum

[Rd] 2.3.1 install bug (PR#9123)

2006-08-04 Thread jim
Full_Name: Jim Wei Version: 2.3.1 OS: Solaris 8 Submission from: (NULL) (38.112.100.65) I have Successfully installed R from version 1.9 to 2.2 on different computer in Solaris 8(sparc), excep 2.3 and 2.31, There is no error when you "configurare", but when you run command "m