Re: [Rd] In base R: argument `list` does not accept lists

2018-04-13 Thread Duncan Murdoch
ers where "list" takes a different kind of object entirely (untar(), unzip()). I couldn't find any examples where an argument named "list" takes a list as a value. There really isn't any substitute for reading the documentation for any function you choose to use.

Re: [Rd] R Bug: write.table for matrix of more than 2, 147, 483, 648 elements

2018-04-18 Thread Duncan Murdoch
Yes, looks like a typo: R_len_t is an int, and that's how nr was declared. It should be R_xlen_t, which is bigger on machines that support big vectors. I haven't tested the change; there may be something else in that function that assumes short vectors. Duncan Murdoch My versi

Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64

2018-04-23 Thread Duncan Murdoch
rid of most of them by building with the recommended packages. Duncan Murdoch | make[3]: Entering directory '/build/R-3.5.0/tests/Examples' | Testing examples for package 'base' | Testing examples for package 'tools' | comparing 'tools-Ex.Rout&#

Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64

2018-04-23 Thread Duncan Murdoch
n that's fine and I'll just disable the test suite in NixOS to make the build succeed. I feel like that would be a sub-optimal solution, though. I agree. You should spend some time working out a better one. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64

2018-04-24 Thread Duncan Murdoch
On 24/04/2018 5:50 AM, Peter Simons wrote: Duncan Murdoch writes: >> ./configure --without-recommended-packages && make && make check > > So you're getting paid to do what you do, but you want the volunteers > in R Core to do some work for you for f

Re: [Rd] predict.glm returns different results for the same model

2018-04-27 Thread Duncan Murdoch
r(call)[1L] != "ns") return(call) at <- attributes(var)[c("knots", "Boundary.knots", "intercept")] xxx <- call[1L:2L] xxx[names(at)] <- at xxx } The test fails for m2, because as.character(call)[1L] is "splines::ns" instead

Re: [Rd] Result of 'seq' doesn't use compact internal representation

2018-04-29 Thread Duncan Murdoch
on? It looks like it is related to using compiled or interpreted code: > library(gtools) > seq2 <- unByteCode(seq.default) > .Internal(inspect(seq.default(1,10))) @7fa53847dcd8 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... > .Internal(inspect(seq2(1,10))) @7fa537fa0bf0 13 INTSXP

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-03 Thread Duncan Murdoch
uires CR LF endings; I haven't used it in years. But there are probably other brain-dead Windows programs that do.) Duncan Murdoch Henrik On Thu, May 3, 2018, 00:44 Joris Meys wrote: Dear all, I've noticed by trying to download gz files from here : https://www.ncbi.nlm.nih.gov

Re: [Rd] length of `...`

2018-05-03 Thread Duncan Murdoch
t calling f(x) incorrectly prints [1] "global" "f" You can get the first element of ... without evaluating the rest using ..1, but I don't know a way to do this for general n in pre-3.5.0 base R. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] length of `...`

2018-05-03 Thread Duncan Murdoch
On 03/05/2018 11:18 AM, Duncan Murdoch wrote: On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: In R-3.5.0 you can use ...length(): > f <- function(..., n) ...length() > f(stop("one"), stop("two"), stop("three"), n=7) [1] 3 Prio

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
n .Internal(unlist(x, recursive, use.names)) (with both recursive and use.names being TRUE), which returns NULL. Duncan Murdoch What should happen: unlist(x) NULL R.version platform x86_64-apple-darwin15.6.0 arch x86_64 os darwin15.6.0 system x86_64, darw

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
On 08/05/2018 2:58 PM, Duncan Murdoch wrote: On 08/05/2018 1:48 PM, Steven Nydick wrote: Reproducible example: x <- list(list(list(), list())) unlist(x) *> Error in as.character.factor(x) : malformed factor* The error comes from the line structure(res, levels = lv, names = nm,

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
... which does not seem to me to be desired behavior. The patch I suggested doesn't help with either of these. I'd suggest collecting examples, and posting a bug report to bugs.r-project.org. Duncan Murdoch On Tue, May 8, 2018 at 2:22 PM Duncan Murdoch <mailto:murdoch.dun...

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-09 Thread Duncan Murdoch
logs.msdn.microsoft.com/commandline/2018/05/08/extended-eol-in-notepad/ Perhaps soon RStudio will follow Notepad's lead, and not convert line endings when it saves a non-native file. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] grDevices::grey could provide clearer error message when length(alpha) != length(level)

2018-05-10 Thread Duncan Murdoch
27; and 'alpha' differ Or it could return a vector of length 2. This is not how it is documented to operate, but it is how many other R functions handle vectors of mixed lengths. Duncan Murdoch __ R-devel@r-project.org mailing list https:/

Re: [Rd] Bug in as.Date or strptime?

2018-06-22 Thread Duncan Murdoch
rigin= '2015-01-01') #Error in charToDate(x) : # string de caracteres não é um formato padrão não ambíguo There's no default conversion for '1'. # example 6 # the safe way, the only one that outputs the right date as.Date(x = '1', format = '%j'

Re: [Rd] list of methods

2018-06-26 Thread Duncan Murdoch
t;- rownames(subset(as.data.frame(installed.packages()), Priority == "base")) for (pkg in basepkgs) { print(ls(getNamespace(pkg), pattern = ".default$")) } This only shows the ones in base packages. If you expand to 'Priority == "recommended&

Re: [Rd] Parametrized Vignettest in R packages

2018-07-02 Thread Duncan Murdoch
t the usual method work? You can specify defaults for parameters in the YAML header; I'd expect those to be the parameter values that get used. You can give instructions to your users on how to rebuild the reports with different parameters. Duncan Murdoch

Re: [Rd] Parametrized Vignettest in R packages

2018-07-02 Thread Duncan Murdoch
, etc. Then users can try it out with new parameter values before customizing it to their own needs. Duncan Murdoch Can you explain what you would want to have happen when the package is built that would require parameterization? ~G On Mon, Jul 2, 2018 at 7:30 AM, Witold E Wolski wrote:

Re: [Rd] Parametrized Vignettest in R packages

2018-07-02 Thread Duncan Murdoch
et(data(sample_analysis)) data: !r get(data(skylineconfig)) but if that doesn't work, a longer version is params: configuration: !r {data(sample_analysis); sample_analysis} data: !r {data(skylineconfig); skylineconfig} Duncan Murdoch Thank you Witek On 2 July 2018 at 16:56, D

Re: [Rd] base::mean not consistent about NA/NaN

2018-07-02 Thread Duncan Murdoch
ly result in NA: a possible exception is where NaN is also involved, in which case either might result (which may depend on the R platform). " So I doubt if this inconsistency will be fixed. Duncan Murdoch Best, Jan [[alternative HTML version deleted]]

Re: [Rd] Testing for vectors

2018-07-07 Thread Duncan Murdoch
f any where base functions act differently on vectors and 1D arrays? (A trivial example is that dimnames(x) gives different results for a named vector and an array with dimnames.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Parametrized Vignettest in R packages

2018-07-09 Thread Duncan Murdoch
On 09/07/2018 8:49 AM, Witold E Wolski wrote: Dear Duncan, Following your advice (Thank you for it) I did include into the vignettes params: configuration: !r get(data(sample_analysis)) data: !r get(data(skylineconfig)) And everything seemed (see below) to work fine. devtools

Re: [Rd] Parametrized Vignettest in R packages

2018-07-09 Thread Duncan Murdoch
you the environment itself. Duncan Murdoch Regards, Yihui -- https://yihui.name On Mon, Jul 9, 2018 at 10:37 AM, Duncan Murdoch wrote: On 09/07/2018 8:49 AM, Witold E Wolski wrote: Dear Duncan, Following your advice (Thank you for it) I did include into the vignettes params: config

Re: [Rd] Parametrized Vignettest in R packages

2018-07-09 Thread Duncan Murdoch
lysis))) in the YAML will set configuration to the expression needed to get the environment; eval(params$configuration) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] RMarkdown Vignettest in R packages with child is failing in package build

2018-07-10 Thread Duncan Murdoch
"children" when your package is installed. Then the vignette can find the file as system.file(file.path("children", child_docs), package = "yourpackage") You could also put them in the "vignettes" directory, but th

Re: [Rd] Top level \Sexpr and R CMD check

2018-07-12 Thread Duncan Murdoch
FALSE,results=rd]{pkg:::decorate_code(' CODE ')} } Duncan Murdoch Thanks, Gabor In the Rd file: \Sexpr[stage=install,strip.white=FALSE,results=rd]{pkg:::decorate_examples(' CODE ')} and pkg::decorate_examples outputs \examples{ MODIFIED CODE } But then: * checking Rd fil

Re: [Rd] Top level \Sexpr and R CMD check

2018-07-12 Thread Duncan Murdoch
On 12/07/2018 7:30 AM, Gábor Csárdi wrote: On Thu, Jul 12, 2018 at 12:23 PM Duncan Murdoch wrote: On 12/07/2018 6:33 AM, Gábor Csárdi wrote: I would like to create \examples{} in the manual dynamically, and while it is possible to do this with a \Sexpr at the top level, R CMD check issues a

Re: [Rd] Top level \Sexpr and R CMD check

2018-07-12 Thread Duncan Murdoch
On 12/07/2018 9:46 AM, Gábor Csárdi wrote: On Thu, Jul 12, 2018 at 2:30 PM Gábor Csárdi wrote: On Thu, Jul 12, 2018 at 2:21 PM Duncan Murdoch wrote: I think I found the bug. The tools::checkRd function only processes \Sexpr's with "stage=render". I think the author (who mig

Re: [Rd] Top level \Sexpr and R CMD check

2018-07-12 Thread Duncan Murdoch
On 12/07/2018 9:46 AM, Gábor Csárdi wrote: On Thu, Jul 12, 2018 at 2:30 PM Gábor Csárdi wrote: On Thu, Jul 12, 2018 at 2:21 PM Duncan Murdoch wrote: I think I found the bug. The tools::checkRd function only processes \Sexpr's with "stage=render". I think the author (who mig

Re: [Rd] RMarkdown Vignettest in R packages with child is failing in package build

2018-07-13 Thread Duncan Murdoch
On 13/07/2018 2:32 AM, Witold E Wolski wrote: Dear Duncan, Thank you, got it working with your advice. I did placed the child markdown documents into inst/ParametrizedReportsChild And this is the code in the main vignette by which I include them: child_docs

Re: [Rd] R History: Why is there no importFrom() function?

2018-07-22 Thread Duncan Murdoch
n as packages, which do have the importFrom() directive. If you've got great big scripts where you would want to import certain functions and don't want the overhead of the package:: prefix, you're doing it wrong. Duncan Murdoch Within R packages, the NAMESPACE file provi

Re: [Rd] Is NULL a vector?

2018-07-23 Thread Duncan Murdoch
l object called NULL. It is used whenever there is a need to indicate or specify that an object is absent. It should not be confused with a vector or list of zero length." Duncan Murdoch Base R functions are a little inconsistent: ## In favour ``` r identical(as.vector(NULL), NULL) #>

Re: [Rd] WishList: Remove Generic Arguments

2018-08-09 Thread Duncan Murdoch
ould be better if generic functions didn't have any arguments except for dots. That makes argument checking much harder. If a generic always needs two arguments, why not name them, so R can complain when a user calls it with just one? Duncan Murdoch ___

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

2018-08-12 Thread Duncan Murdoch
hieve using plain R code? I think so. substitute(list(...)) gives you a single expression containing a call to list() with the unevaluated arguments; you can convert that to what you want using something like dots <- function (...) { exprs <- substitute(list(...

Re: [Rd] longint

2018-08-15 Thread Duncan Murdoch
segfault? I don't think the passing would cause a segfault, but "some code" might be expecting a positive number, and due to the type error you could pass in a positive longint and have it interpreted as a negative int. Duncan Murdoch _

Re: [Rd] validspamobject?

2018-08-18 Thread Duncan Murdoch
s than the stated limit. You can't share examples between different help pages, but you can combine topics in a single page, so there's only one example to run. The usual way to speed up examples is to make up trivial datasets for them, rather than running them on real data. Duncan

Re: [Rd] Translating Rd files

2018-08-21 Thread Duncan Murdoch
seen as desirable but no action had been taken to put it in place. The thinking was that it was too much work for the translators to have to follow every update to each help page, so the translated pages would likely soon be out of date. Duncan Murdoch I am thinking about a way to register

Re: [Rd] conflicted: an alternative conflict resolution strategy

2018-08-23 Thread Duncan Murdoch
issue would arise far less often, because namespaces in packages are intended to solve the same problem as your package does. One more comment inline about a typo, possibly in an error message. Duncan Murdoch On 23/08/2018 2:31 PM, Hadley Wickham wrote: Hi all, I’d love to get your feedback o

Re: [Rd] conflicted: an alternative conflict resolution strategy

2018-08-24 Thread Duncan Murdoch
7;s workspace is irrelevant to code within the package if it does its imports properly. You can reference functions that are not imported, but you get a message when you run checks to tell you not to do that. Duncan Murdoch Moving a function to another package may be a transitional is

Re: [Rd] Where does L come from?

2018-08-25 Thread Duncan Murdoch
3 suddenly became an integer value different from 3. would have led to lots of inefficient conversions (since stats mainly deals with floating point values). Duncan Murdoch The fact that nowadays "int" and "long int" have the same size on most platforms is only anecdot

Re: [Rd] Modification-proposal for %% (modulo) when supplied with double

2018-09-11 Thread Duncan Murdoch
ct too. The real problem is that in double precision floating point the numbers 9.1 and .1 can't be represented exactly. This is well known, it's in the FAQ (question 7.31). Duncan Murdoch Background I was writing some code where something has to happen at a certain interval,

Re: [Rd] Problem building rmarkdown vignettes with child

2018-09-14 Thread Duncan Murdoch
ing the filename. Quitting from lines 387-388 (./child_docs) This one looks like it's a filename again. It's a long vignette, and not easy to spot where things are going wrong. I'd recommend backing up the original, and just cutting things out until the only thing left is

Re: [Rd] Rscript -e does not accept newlines under Linux?

2018-09-17 Thread Duncan Murdoch
ibrary/Frameworks/R.framework/Resources/bin/exec/R" [2] "--slave" [3] "--no-restore" [4] "-e" [5] "commandArgs()" [6] "ls()" And finally, this also works: Rscript -e 'ls() -e ls()' Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] diag(-1) produces weird result

2018-09-17 Thread Duncan Murdoch
tinct usages: ... 3. x is a scalar (length-one vector) and the only argument, it returns a square identity matrix of size given by the scalar." Duncan Murdoch diag(1) [,1] [1,]1 diag(c(-1,1)) [,1] [,2] [1,] -10 [2,]01 diag(-1) Error in diag(-1) : inv

Re: [Rd] Suggested Patch: Adding commas to list of packages after R CMD check

2018-09-18 Thread Duncan Murdoch
paste this list. This would be especially helpful when the list of missing dependencies is extensive. This seems like a reasonable suggestion, considering how easy it is to do. Another suggestion would be to (optionally) automatically install missing dependencies. I think the devtools::install_

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
y as much as one part in 2^32. It's very difficult to detect a probability difference that small, but if you define the partition of values into the high probability values vs the low probability values, you can probably detect the difference in a feasible simulation.

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
On 19/09/2018 9:09 AM, Iñaki Ucar wrote: El mié., 19 sept. 2018 a las 14:43, Duncan Murdoch () escribió: On 18/09/2018 5:46 PM, Carl Boettiger wrote: Dear list, It looks to me that R samples random integers using an intuitive but biased algorithm by going from a random number on [0,1) from

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
On 19/09/2018 9:40 AM, David Hugh-Jones wrote: On Wed, 19 Sep 2018 at 13:43, Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: I think the analyses are correct, but I doubt if a change to the default is likely to be accepted as it would make it more dif

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
wo 32 bit values, but some of the bits are thrown away. Duncan Murdoch The selection ratios can get close to 2. Computer scientists don't do it the way R does, for a reason. Regards, Philip On Wed, Sep 19, 2018 at 9:05 AM Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wr

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
d that there has ever been a simulation run with detectable bias compared to Monte Carlo error unless it (like this one) was designed specifically to show the problem. Duncan Murdoch (RNG.c, lines 793ff) double R_unif_index(double dn) {     double cut = INT_MAX;     switch(RNG_kind) {    

[Rd] A different error in sample()

2018-09-19 Thread Duncan Murdoch
eplace = TRUE)) 1 2 3 399933 399716 200351 We shouldn't have those 3's if truncation of x had occurred. Duncan Murdoch > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix product

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
On 19/09/2018 3:52 PM, Philip B. Stark wrote: Hi Duncan-- Nice simulation! The absolute difference in probabilities is small, but the maximum relative difference grows from something negligible to almost 2 as m approaches 2**31. Because the L_1 distance between the uniform distribution on

Re: [Rd] Bias in R's random integers?

2018-09-19 Thread Duncan Murdoch
Carl described. Duncan Murdoch David On Wed, 19 Sep 2018 at 21:20, Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: On 19/09/2018 3:52 PM, Philip B. Stark wrote: > Hi Duncan-- > > That is a mathematically true statement, but I suspect it is not

Re: [Rd] future time stamps warning

2018-09-20 Thread Duncan Murdoch
sing tar ztvf wCorr_1.9.0.tar.gz Are the timestamps correct? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Bias in R's random integers?

2018-09-20 Thread Duncan Murdoch
ly bad. You'll see problems in y %% 2 for any integer a > 1 with m = 2/(1 + 2a) * 2^32, problems in y %% 3 for m = 3/(1 + 3a)*2^32 or m = 3/(2 + 3a)*2^32, etc. So perhaps I'm starting to be convinced that the default sample() should be fixed. Duncan Murdoch Currently I am takin

Re: [Rd] Bias in R's random integers?

2018-09-20 Thread Duncan Murdoch
On 20/09/2018 11:01 AM, Radford Neal wrote: From: Duncan Murdoch Let's try it: > m <- (2/5)*2^32 > m > 2^31 [1] FALSE > x <- sample(m, 100, replace = TRUE) > table(x %% 2) 0 1 399850 600150 Since m is an even number, the true proportions o

Re: [Rd] sys.call() inside replacement functions incorrectly returns *tmp*

2018-10-15 Thread Duncan Murdoch
efinition manual, section 3.4.4: "Assignment to subsets of a structure is a special case of a general mechanism for complex assignment: x[3:5] <- 13:15 The result of this command is as if the following had been executed `*tmp*` <- x x <- "[<-"(`*tmp*`, 3:5, valu

Re: [Rd] invisible functions

2018-10-16 Thread Duncan Murdoch
hat is a copy of cord.work, rather than calling cord.work by name. 2. change cfun[[1]] <- quote(cord.work) to cfun[[1]] <- quote(survival:::cord.work). You say this will mess up your test bed. That suggests that your test bed is broken. This is a perfectly legal and valid solution.

Re: [Rd] invisible functions

2018-10-17 Thread Duncan Murdoch
handy for small mods. I generally rebuild a package after each change. In RStudio that's pretty simple: "Install and Restart" saves the current workspace, shuts down R, installs the revised package, and restarts R with the old workspace. It&

Re: [Rd] Bug report for sealClass() in Core-maintained package "methods"

2018-10-26 Thread Duncan Murdoch
gests that reports here are sufficient, but it's wrong. Usually they are not. Duncan Murdoch Thanks, Adam From: Gower, Adam Sent: Monday, June 19, 2017 11:56 AM To: 'r-devel@r-project.org' Subject: Bug report for sealClass() in Core-maintained package "methods" Hel

Re: [Rd] CRAN Feature Request: install.data (task.view="Cluster")

2018-10-28 Thread Duncan Murdoch
sing something? This is something you should write yourself. Do it by downloading the package, unpacking it, then extracting the data. I suspect everything you need is already built into R, in the code that installs a package. You just need to rewrite it to do much less

Re: [Rd] Bias in R's random integers?

2018-11-01 Thread Duncan Murdoch
An email today reminded me of this issue. The other bug (fractional population sizes) was fixed quite a while ago, but this one still exists. I've posted a bug report about it (PR#17494). Duncan Murdoch On 20/09/2018 11:15 AM, Duncan Murdoch wrote: On 20/09/2018 6:59 AM, Ralf Stubner

Re: [Rd] Better cleanup of example session during check

2018-11-12 Thread Duncan Murdoch
list wants plain text. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Better cleanup of example session during check

2018-11-12 Thread Duncan Murdoch
On 12/11/2018 8:32 AM, Duncan Murdoch wrote: On 12/11/2018 8:09 AM, Thomas Lin Pedersen wrote: I have a couple of packages (‘fiery’ and ‘reqres') that uses a mock of a rook request for their examples. The mock is an R6 object containing a rawConnection, along with a finalizer that closes

Re: [Rd] Compiler + stopifnot bug

2019-01-03 Thread Duncan Murdoch
I see this too; by bisection, it seems to have first appeared in r72943. Duncan Murdoch On 03/01/2019 2:18 p.m., Iñaki Ucar wrote: Hi, I found the following issue in r-devel (2019-01-02 r75945): `foo<-` <- function(x, value) { bar(x) <- value * x x } `bar<-` <- fu

Re: [Rd] Compiler + stopifnot bug

2019-01-03 Thread Duncan Murdoch
On 03/01/2019 3:37 p.m., Duncan Murdoch wrote: I see this too; by bisection, it seems to have first appeared in r72943. Sorry, that was a typo. I meant r75943. Duncan Murdoch Duncan Murdoch On 03/01/2019 2:18 p.m., Iñaki Ucar wrote: Hi, I found the following issue in r-devel (2019-01

Re: [Rd] pmax and long vector

2019-01-21 Thread Duncan Murdoch
urage people to produce patches as above. I'm not so sure a report about a single function won't just get lost. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Runnable R packages

2019-01-31 Thread Duncan Murdoch
installation code from the `remotes` package, so run_main() could be a pretty simple function. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Runnable R packages

2019-02-02 Thread Duncan Murdoch
s" package has almost everything you need so that "yourpackage" could be nearly trivial. You wouldn't need to duplicate it within base R. Duncan Murdoch If people think this adds value, then if they want to offer that value to me as $ or £, I'd consider writing it if

Re: [Rd] Inefficiency in df$col

2019-02-03 Thread Duncan Murdoch
just delete the definition of $.data.frame, reverting to the situation before R-3.1.0. I imagine the cause is that the list version is done in C code rather than R code (i.e. there's no R function `$.list`). So an alternative solution would be to also implement `$.data.frame` in the underlying C code. This won't be quite as fast (it needs that test for NULL), but should be close in the full match case. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Inefficiency in df$col

2019-02-04 Thread Duncan Murdoch
meant me, it needs to be "They": I am not a member of R Core and can't make any changes to the sources. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Inefficiency in df$col

2019-02-04 Thread Duncan Murdoch
a.frame is in the base package, it is handled specially in src/library/base/R/zzz.R. I'll email you a patch if it compiles and passes checks. Duncan Murdoch -pd On 4 Feb 2019, at 15:32 , Duncan Murdoch wrote: On 04/02/2019 9:20 a.m., Radford Neal wrote: I think you might want to just d

Re: [Rd] Inefficiency in df$col

2019-02-04 Thread Duncan Murdoch
is no difference between the behaviour of $ on a data.frame or a list (except for the wording of the warning message), so the $.list method (which is fast) is sufficient. Duncan Murdoch >> On 4 Feb 2019, at 15:32 , Duncan Murdoch wrote: >> >> On 04/02/201

Re: [Rd] Bug Report: read.table with UTF-8 encoded file imports infinity symbol as Integer 8

2019-02-08 Thread Duncan Murdoch
nearly trivial, much easier than many of the conversions it does. And Microsoft has revenues of $90 billion per year, while R Core only has a few individuals donating their time: so wouldn't it make more sense to ask them to act like responsible members of the computing community? Dun

Re: [Rd] Error in rbind(info, getNamespaceInfo(env, "S3methods"))

2019-02-18 Thread Duncan Murdoch
mber of columns. (This will load all of them, so might need to be broken up into batches.) Duncan Murdoch The problem seems to be my library. It is large (3,418 packages) and I'd like to avoid rebuilding it, if possible. All packages are up to date according to update.packages(). The

Re: [Rd] Improved Data Aggregation and Summary Statistics in R

2019-02-27 Thread Duncan Murdoch
front-end.) Hadley Wickham's book <http://r-pkgs.had.co.nz/> is a pretty accessible description of a development strategy. (It's not the only strategy, but lots of people use it.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Package inclusion in R core implementation

2019-03-04 Thread Duncan Murdoch
On 04/03/2019 7:59 a.m., Jim Hester wrote: 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 recom

Re: [Rd] all.equal failure

2019-04-05 Thread Duncan Murdoch
e(current))) "formulas differ in contents" else TRUE } So the issue is that deparse(t0x) and deparse(t1x) give the same strings with no attributes shown, even though "showAttributes" is set by default. I haven't traced through the C code to see where things a

Re: [Rd] [EXTERNAL] Re: all.equal failure

2019-04-05 Thread Duncan Murdoch
On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote: Duncan,   I should have included it in my original note, but      all.equal(unclass(t0x), unclass(t1x)) returns TRUE as well.  I had tried that as well.   But a further look at all.equal.default shows the following line right near

Re: [Rd] [EXTERNAL] Re: Re: all.equal failure

2019-04-05 Thread Duncan Murdoch
On 05/04/2019 10:46 a.m., Therneau, Terry M., Ph.D. wrote: On 4/5/19 9:39 AM, Duncan Murdoch wrote: On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote: Duncan,    I should have included it in my original note, but       all.equal(unclass(t0x), unclass(t1x)) returns TRUE as well

Re: [Rd] [EXTERNAL] Re: Re: all.equal failure

2019-04-05 Thread Duncan Murdoch
On 05/04/2019 11:33 a.m., Martin Maechler wrote: Duncan Murdoch on Fri, 5 Apr 2019 11:12:48 -0400 writes: > On 05/04/2019 10:46 a.m., Therneau, Terry M., Ph.D. wrote: >> >> >> On 4/5/19 9:39 AM, Duncan Murdoch wrote: >>> On 05/04/2019

Re: [Rd] R 3.5.3 and 3.6.0 alpha Windows bug: UTF-8 characters in code are simplified to wrong ones

2019-04-10 Thread Duncan Murdoch
conversion at all, but as Tomas said, that's a lot harder. Duncan Murdoch Regards, Yihui -- https://yihui.name On Wed, Apr 10, 2019 at 6:36 AM Tomas Kalibera wrote: On 4/10/19 1:14 PM, Jeroen Ooms wrote: On Wed, Apr 10, 2019 at 12:19 PM Tomáš Bořil wrote: Minimalistic example: Let'

Re: [Rd] R 3.5.3 and 3.6.0 alpha Windows bug: UTF-8 characters in code are simplified to wrong ones

2019-04-10 Thread Duncan Murdoch
On 10/04/2019 12:32 p.m., Jeroen Ooms wrote: On Wed, Apr 10, 2019 at 5:45 PM Duncan Murdoch wrote: On 10/04/2019 10:29 a.m., Yihui Xie wrote: Since it is "technically easy" to disable the best fit conversion and the best fit is rarely good, how about providing an option for co

Re: [Rd] R-devel (rev 76409) fails 'make check': non-generic function 'isSymmetric' given to findMethods()

2019-04-21 Thread Duncan Murdoch
ction 'isSymmetric' given to findMethods()    Execution halted Likely the problem is that you don't have the recommended packages loaded. When I was running tests regularly, they were required. Later, I think they became optional. Perhaps a new test has been added that once agai

Re: [Rd] Suspect error in windows version of 3.60

2019-04-27 Thread Duncan Murdoch
d to trigger presentation of a list of packages to install. That list takes time to download from CRAN, so perhaps you are just too impatient to wait for it, or perhaps it really is broken: but the NULL is not the issue. Duncan Murdoch I assume this is not intentional awaiting packag

Re: [Rd] Suspect error in windows version of 3.60

2019-04-27 Thread Duncan Murdoch
On 27/04/2019 2:46 p.m., Duncan Murdoch wrote: On 27/04/2019 10:30 a.m., Len Weil wrote: Gentlemen, I've observed a suspected bug in R-3.60 for Windows 10. I am using the latest R version, but I have observed the same error in all releases: alpha, beta RC and released. Also the

Re: [Rd] R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments

2019-05-03 Thread Duncan Murdoch
Your results below make it look like a bug in optim(): it is not duplicating a value when it should, so changes to x affect xx as well. Duncan Murdoch On 03/05/2019 4:41 a.m., Serguei Sokol wrote: On 03/05/2019 10:31, Serguei Sokol wrote: On 02/05/2019 21:35, Florian Gerber wrote: Dear all

Re: [Rd] R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments

2019-05-03 Thread Duncan Murdoch
first... Duncan Murdoch On 03/05/2019 7:13 a.m., peter dalgaard wrote: Yes, I think you are right. I was at first confused by the fact that after the optim() call, environment(fn)$xx [1] 10 environment(fn)$ret [1] 100.02 so not 9.999, but this could come from x being assigned the final

Re: [Rd] rgl install for R 3.7

2019-06-02 Thread Duncan Murdoch
.0 (clang-900.0.39.2) So this isn't very relevant, but for what it's worth, rgl compiles and loads fine in the current R-devel (r76642). Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Offer zip builds

2019-06-03 Thread Duncan Murdoch
I retired from building the binaries a couple of years ago). If you think it's worthwhile to do it, then I don't think anyone would object if you went ahead and did so. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Offer zip builds

2019-06-04 Thread Duncan Murdoch
On 03/06/2019 9:16 p.m., Steven Penny wrote: On Mon, Jun 3, 2019 at 8:04 PM Duncan Murdoch wrote: I don't recall anyone asking for the zip in the 17 years after that change, until now (though I haven't been paying attention lately, since I retired from building the binaries a coupl

Re: [Rd] Offer zip builds

2019-06-05 Thread Duncan Murdoch
n't want to run the installer, see Iñaki's message for how to extract the files without running it. I don't know if any of the configuration done by the installer is essential; you can read the source in https://svn.r-project.org/R/trunk/src/gnuwin32/installer if you are curious.

Re: [Rd] Setting LC_CTYPE=en_US.UTF-8 failed

2019-06-06 Thread Duncan Murdoch
ild, not a POSIX build, so that's not a legal value. He could try the Cygwin build, but I think it has other problems, and isn't supported by R Core. As far as I know there is no Windows locale that fully supports UTF-8. Duncan Murdoch _

Re: [Rd] Setting LC_CTYPE=en_US.UTF-8 failed

2019-06-06 Thread Duncan Murdoch
On 06/06/2019 7:28 a.m., Duncan Murdoch wrote: On 06/06/2019 6:22 a.m., Tomas Kalibera wrote: On 6/5/19 3:49 AM, Steven Penny wrote: Using this in my "~/.profile":    export LC_ALL=en_US.UTF-8 Yields this:    $ Rscript -e 'print(9)'    During startup - Warning m

Re: [Rd] R pkg install should fail for unsuccessful DLL copy on windows?

2019-06-06 Thread Duncan Murdoch
o add, but "me too" messages just waste everybody's time. Duncan Murdoch Thanks Toby On Tue, Jun 4, 2019 at 2:58 PM Pages, Herve wrote: On 5/31/19 08:41, Toby Hocking wrote:... In my opinion install.packages should stop with an error (instead of a warning) if this happens.

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-06 Thread Duncan Murdoch
On 06/06/2019 5:04 p.m., Richard O'Keefe wrote: How can expanding tildes anywhere but the beginning of a file name NOT be considered a bug? It looks like a bug in R, but not necessarily a bug in libreadline: we may just be using tilde_expand improperly. Duncan Murdoch On Thu,

Re: [Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Duncan Murdoch
quot; if the session run OK or exiting with !0 exit code? Can't you just put the line to run it as the last line of your script? You won't get there if there was an error. The point of reg.finalizer is to run code even if there was an error; your situation is much simpler. Duncan Mu

Re: [Rd] Determining the exit code of an "almost finished" R script

2019-06-08 Thread Duncan Murdoch
On 08/06/2019 9:55 a.m., Gergely Daróczi wrote: On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch wrote: On 08/06/2019 7:42 a.m., Gergely Daróczi wrote: Dear All, I'm using "reg.finalizer" in a function that is to be called in R scripts to do some cleanup on success. I have not

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-11 Thread Duncan Murdoch
;--no-readline" when you start R, it will be fine on Linux, as far as I can see. I wouldn't choose that as the default way to run R (it's pretty irritating not to have readline support), but it is a workaround for this bug. Duncan Murdoch Hence, if you have a Windows mac

<    1   2   3   4   5   6   7   8   9   10   >