Re: [Rd] tools::package_native_routine_registration_skeleton?

2019-06-28 Thread Duncan Murdoch
ackage:quantreg"), sep = ", ") will print the list in a form suitable for including in the export() directive in your NAMESPACE file. Just delete the names that are meant for internal use only. Duncan Murdoch Roger Koenker r.koen...@ucl.ac.uk<mailto:r.koen...@ucl.ac.uk>

Re: [Rd] R-Forge > GitHub?

2019-06-28 Thread Duncan Murdoch
the record: that was Henrik Singmann's suggestion, I just agreed with it. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Making R CMD nicer

2019-06-30 Thread Duncan Murdoch
On 30/06/2019 8:08 p.m., Abby Spurdle wrote: In that case, I was wrong. And I must apologize... In saying that, good to see Windows out performing Linux on the command line... That's going to set the bees abuzz... __ R-devel@r-project.org mailing li

Re: [Rd] strange increase in the reference number

2019-07-12 Thread Duncan Murdoch
e in the memory manager. (But see http://developer.r-project.org/Refcnt.html for some plans. That document is from about 5 years ago; I don't know the current state.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
+ 1 + # browser() + x = NextMethod() + return(x) + } > > df <- as.data.frame(matrix(1:20, nrow=5)) > class(df) <- c("MYCLASS","data.frame") > counttt [1] 0 So there's something else going on in your system. Maybe post sessionInfo()? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
ment view. Do you see this when running R from the command line? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [External] Re: Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
Environment panel. If this concerns you then you should contact RStudio. Now I see it! Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] install packages with missing pkg argument

2019-07-29 Thread Duncan Murdoch
e requesting is listed as having been done in the NEWS for 3.6.0... Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] iconv: embedded nulls when converting to UTF-16

2019-08-05 Thread Duncan Murdoch
t;test" > iconv(s, to="UTF-16",toRaw=TRUE) [[1]] [1] fe ff 00 74 00 65 00 73 00 74 I don't know if SQL Server can handle raw vectors; I'd try to get it to accept UTF-8 input instead. Duncan Murdoch Thanks, Michael —— sessionInfo() #> R version 3.6.1 (2019

Re: [Rd] Underscores in package names

2019-08-08 Thread Duncan Murdoch
kage names? The tarball names separate the package name from the version number using an underscore. There is code that is written to assume there is at most one underscore, e.g. .check_package_CRAN_incoming in src/library/tools/R/QC.r. That code could be changed, but so could the propose

Re: [Rd] Underscores in package names

2019-08-09 Thread Duncan Murdoch
2-018/index.html Looking at the article now, it's not as entertaining as I remember his presentation was, but it makes good points about the value of consistency. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Underscores in package names

2019-08-09 Thread Duncan Murdoch
named "FuzzyNumbers.Ext.2", whose tarball is FuzzyNumbers.Ext.2_3.2.tar.gz, so I think we've already lost that game. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Underscores in package names

2019-08-09 Thread Duncan Murdoch
On 09/08/2019 4:37 p.m., Gabriel Becker wrote: Duncan, On Fri, Aug 9, 2019 at 1:17 PM Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: On 09/08/2019 2:41 p.m., Gabriel Becker wrote: > Note that this proposal would make mypackage_2.3.1 a valid *package name*,

Re: [Rd] Documenting else's greed

2019-08-16 Thread Duncan Murdoch
s) or a newline. I don't know how many of those there are, but the list would include at least semicolon, newline, }, ), ], and maybe others. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

r-devel@r-project.org

2019-08-19 Thread Duncan Murdoch
was general agreement that it would be a good idea to add some warnings. News for R 3.6.0 includes this: "Experimentally, setting environment variable _R_CHECK_LENGTH_1_LOGIC2_ will lead to warnings (or errors if the variable is set to a ‘true’ value) when && or || encounter and use a

Re: [Rd] Conventions: Use of globals and main functions

2019-08-25 Thread Duncan Murdoch
ons in short scripts. That's how I've always recommended large projects be organized. You don't want a long script for anything, and you don't want multiple source files unless they're in a package. Duncan Murdoch This question was motivated largely by this discussi

Re: [Rd] Conventions: Use of globals and main functions

2019-08-25 Thread Duncan Murdoch
t for anything worth keeping. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] wrap_logical warning message when loading objects created in R 3.6 in an R 3.5 session

2019-08-26 Thread Duncan Murdoch
, but it appears you have an object new to 3.6.0 that needs something that doesn't exist in 3.5.0. The solution is probably to use 3.6.x to read that file, and then save it with "version=2" as an argument. That should cause it to use the older format. Duncan Murdoch Ideally,

Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread Duncan Murdoch
On 26/08/2019 1:58 p.m., William Dunlap wrote: Duncan Murdoch wrote: > Scripts are for throwaways, not for anything worth keeping. I totally agree and have a tangentially relevant question about the <<- operator.  Currently 'name <<- value' means to look up the env

Re: [Rd] typeof(getOption("warn")) is "integer" instead of "double" in R unstable (2019-09-27 r77229)? Reproducible?

2019-09-29 Thread Duncan Murdoch
t should be a whole number value (talking about 0, 1, "2 or more", not about what would happen with options(warn = pi/2), for example. In older versions, options(warn = pi/2) is treated the same as options(warn = 1), and in the new version, it is displayed as 1 as well. Duncan Murdoc

Re: [Rd] typeof(getOption("warn")) is "integer" instead of "double" in R unstable (2019-09-27 r77229)? Reproducible?

2019-09-29 Thread Duncan Murdoch
.ch/R-manual/R-devel/doc/html/NEWS.html And if you want to follow along, you can get it as an RSS feed from <http://developer.r-project.org/RSSfeeds.html>. If you don't know what an RSS feed is, see feedly.com. Duncan Murdoch On Sun, 2019-09-29 at 08:33 -0400, Duncan Murdoch

Re: [Rd] R CMD build should fail early for old package versions?

2019-09-30 Thread Duncan Murdoch
kage in Suggests, your package should work (perhaps with some limitations) without the suggested one. Unfortunately for you, the limitation "can't rebuild the vignettes" is incompatible with building the package, but I don't think there's anything you can put in the DE

[Rd] Is missingness always passed on?

2019-10-01 Thread Duncan Murdoch
Is the documentation out of date? That quote appears to have been written in 2002. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Is missingness always passed on?

2019-10-01 Thread Duncan Murdoch
On 01/10/2019 4:58 a.m., Serguei Sokol wrote: Le 30/09/2019 à 16:17, Duncan Murdoch a écrit : There's a StackOverflow question https://stackoverflow.com/q/22024082/2554330 that references this text from ?missing: "Currently missing can only be used in the immediate body of the fun

Re: [Rd] should base R have a piping operator ?

2019-10-06 Thread Duncan Murdoch
ed at all unless they want to update Rgui or R.app or command line R. Duncan Murdoch If iris %>% group_by(Species) %>% summarize(mean_sl = mean(Sepal.Length)) %>% filter(mean_sl > 5) were *parsed* as, for example, into local({ . = group_by(iris, Species) ._

Re: [Rd] should base R have a piping operator ?

2019-10-07 Thread Duncan Murdoch
nt. In that case, the `.` binding, if any, would be restored to its original value in `on.exit()` (or through unwind-protection if implemented in C). That makes sense. Duncan Murdoch Best, Lionel On 6 Oct 2019, at 01:50, Gabriel Becker wrote: Hi all, I think there's some nuance

Re: [Rd] should base R have a piping operator ?

2019-10-07 Thread Duncan Murdoch
On 07/10/2019 8:38 a.m., Lionel Henry wrote: On 7 Oct 2019, at 13:47, Duncan Murdoch <mailto:murdoch.dun...@gmail.com>> wrote: On 07/10/2019 4:22 a.m., Lionel Henry wrote: Hi Gabe, There is another way the pipe could go into base R that could not be done in package space an

Re: [Rd] S3 lookup rules changed in R 3.6.1

2019-10-09 Thread Duncan Murdoch
f the generic. ---- Duncan Murdoch I am implementing S3 dispatch for generic methods in environments that are not packages. I am trying to emulate the R package namespace mechanism by having a “namespace” environment that de

Re: [Rd] How to refer to my package from another package DESCRIPTION

2019-10-10 Thread Duncan Murdoch
, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘Package2’ It can’t find it. However, it does not seem like the correct thing is to have R_LIBS_USER=/myHome/libraries Why not? Duncan Murdoch How should I go about this? Thanks in advance! [[alternative HTML

Re: [Rd] New matrix function

2019-10-11 Thread Duncan Murdoch
on to base R? I am happy to work with someone from the R core team (if you wish) and suggest an implementation in C. That seems like it would sometimes be a useful function, and maybe someone will point out a package that already contains it. But if not, why would it belong in

Re: [Rd] set.seed() in a package

2019-10-30 Thread Duncan Murdoch
)'s set.seed(324) is bad practice. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] set.seed() in a package

2019-10-30 Thread Duncan Murdoch
efore any serious simulations.) I think it's pretty common in example code, and that's justifiable. But it could be avoided by using withr::with_seed() or something equivalent. Duncan Murdoch You can fairly easily work around that by saving and restoring .Random.seed. I wonde

Re: [Rd] Puzzled about a new method for "[".

2019-11-03 Thread Duncan Murdoch
quot;cols" is defined there as a local variable. The "drop" argument shouldn't be used until it is. (There's a call to "missing(drop)" early in the source that doesn't count: it doesn't evaluate "drop", it just checks whether it is specified by the caller.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Puzzled about a new method for "[".

2019-11-03 Thread Duncan Murdoch
On 03/11/2019 6:43 p.m., Rolf Turner wrote: On 4/11/19 10:31 AM, Duncan Murdoch wrote: On 03/11/2019 4:11 p.m., Rolf Turner wrote: I recently tried to write a new method for "[", to be applied to data frames, so that the object returned would retain (all) attributes of t

Re: [Rd] Puzzled about a new method for "[".

2019-11-04 Thread Duncan Murdoch
tent. Hadley it right that restoring the original attributes of a vector (list or atomic) after subsetting is unsafe. Right, so Rolf should only restore attributes that are ones he added in the first place. Unknown attributes should be left alone. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] improving the performance of install.packages

2019-11-08 Thread Duncan Murdoch
n(pkgs, ..., force = FALSE) { if (!force) { pkgs <- Filter(Negate(requireNamespace), pkgs utils::install.packages(pkgs, ...) } You might want to make this more elaborate, e.g. doing update.packages() on the ones that exist. But really, isn't the problem with the script yo

Re: [Rd] improving the performance of install.packages

2019-11-08 Thread Duncan Murdoch
ALSE. If you didn't change the default, it wouldn't help your example: the badly written script would run with force=TRUE, and wouldn't benefit at all. Duncan Murdoch Package managers like pip (python), conda (python), yum (CentOS), apt (Ubuntu), and apk (Alpine) are all &

Re: [Rd] improving the performance of install.packages

2019-11-08 Thread Duncan Murdoch
then use update.packages() all the time instead of install.packages() the first time and update.packages() subsequent times. That makes more sense to me than the "force = FALSE" proposal. Duncan Murdoch Bill Dunlap TIBCO Software wdunlap tibco.com <http://tibco

Re: [Rd] improving the performance of install.packages

2019-11-08 Thread Duncan Murdoch
d script (by deleting one line) is the solution to the problem, not fixing R with a multistage series of revisions, tests, etc. Duncan Murdoch and more so when installing lots of packages conditionally, e.g. if (requireNamespace("foo")) install.packages("foo") if (require

Re: [Rd] class() |--> c("matrix", "arrary") [was "head.matrix ..."]

2019-11-10 Thread Duncan Murdoch
") # Creates an object named t2 of class "trackcurve" # that contains "track" inherits(t2, "track") # TRUE "track" %in% class(t2) # FALSE I can't think of any examples not involving S4. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] calls with comment attribute

2019-11-12 Thread Duncan Murdoch
ar with R history: the current revision of R is 77405. That particular file has been revised 248 times since rev 2.) I suspect either nobody has noticed it before, or nobody had the nerve to touch it. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] S3 methods in packages. Change in R 4.0.0?

2019-11-16 Thread Duncan Murdoch
efinitely something you should do. Put this into NAMESPACE: S3method(print, my1stclass) and it should be fine. Duncan Murdoch A similar problem has function plot, I don't show it here. It leads to an error message, when plot.default and xy.coords cannot work with the object for which t

Re: [Rd] Maybe bug? Using non-integer frequencies in stats::ts

2019-12-05 Thread Duncan Murdoch
t there, let us know, and either someone will give you one, or someone will report it for you.) As a workaround, I don't see it happening with extend=FALSE, but of course that might not suit your needs in general. Duncan Murdoch Thank you for your consideration, Johann On Mon,

Re: [Rd] Maybe bug? Using non-integer frequencies in stats::ts

2019-12-06 Thread Duncan Murdoch
age.) On the other hand, it comes close to working, and it seems like allowing frequency=0.2 would be a useful addition. I'm going to keep looking, and see how hard it would be to get this to work properly. If it doesn't break other things, I may submit this as an enhancement. D

Re: [Rd] Maybe bug? Using non-integer frequencies in stats::ts

2019-12-08 Thread Duncan Murdoch
I've now posted this as an enhancement request: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17669 On 06/12/2019 12:35 p.m., Duncan Murdoch wrote: To R-devel: I've sent this to Johann privately already; just in case anyone else is interested in this issue, here's what

[Rd] Windows check problems.

2019-12-11 Thread Duncan Murdoch
est for the presence of DESCRIPTION in the newly created location), falling back to a copy if things didn't succeed. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] A weird behaviour of strsplit?

2019-12-18 Thread Duncan Murdoch
be used. If you wanted to use both, you would need a longer x. For example, > strsplit(c("1:2", "3:4"), split=c(",", ":"), fixed=TRUE) [[1]] [1] "1:2" [[2]] [1] "3" "4" The first element is split using "," --

Re: [Rd] best way to build from Git

2019-12-26 Thread Duncan Murdoch
copy has been updated: it understands the svn revision numbers recorded in the patch. (Conflicts cause trouble, but no more than any other time.) This doesn't work so well if you are adding or moving files. The patch produced in this way is also suitable for including in a bug repor

Re: [Rd] best way to build from Git

2019-12-26 Thread Duncan Murdoch
is the case for the vast majority of R-corers. When I was building for Windows, the workflow required the build to be in the source tree. Windows systems weren't assumed to be able to run configure, so all the work it does was done manually for the Rtools tools. Duncan Murdoch

Re: [Rd] "simulate" does not include variability in parameter estimation

2019-12-27 Thread Duncan Murdoch
, and var(unlist(simulate(lm(x0~1), 1, 1))) is 2.0064.  Shouldn't it be 3 = var(mean(x0)) + var(x0) = (2/2) + 2? That calculation ignores the uncertainty in the estimation of sigma. Duncan Murdoch         * In the glm example with x1=1, var(unlist(simulate(glm(x1~1, poisson), 100

Re: [Rd] "simulate" does not include variability in parameter estimation

2019-12-27 Thread Duncan Murdoch
On 27/12/2019 10:31 a.m., Spencer Graves wrote: On 2019-12-27 04:34, Duncan Murdoch wrote: On 26/12/2019 11:14 p.m., Spencer Graves wrote: Hello, All:     The default "simulate" method for lm and glm seems to ignore the sampling variance of the parameter estimates;  see the

Re: [Rd] [patch] add sanity checks to quantile()

2020-01-04 Thread Duncan Murdoch
h proposal it is. Certainly if you don't get action (or at least discussion) within a few days, any other proposal will be forgotten. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] standard naming for components of R data structures

2020-01-06 Thread Duncan Murdoch
On 06/01/2020 5:19 p.m., neonira Arinoem wrote: @steve Seek for online document named "writing R extensions" chapter 2. It tells You hardly need to look for it online: it is included with every copy of R. Just run help.start() in R (or look in the menus for the GUI versions)

Re: [Rd] as-cran issue

2020-01-13 Thread Duncan Murdoch
hat I get a different error report; it reports this test instead: if(class(varlist) == "coxmevar") That appears in a number of places in the coxme source, and clearly needs to be updated to use inherits(). Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread Duncan Murdoch
ould be as simple as replacing n by R_forceint(n) in the k = n - k step. I think that would break symmetry: you want choose(n, k) to equal choose(n, n-k) when n is very close to an integer. So I'd suggest the replacement whenever R_IS_INT(n) is true. Duncan Murdoch -pd On 14 Ja

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread Duncan Murdoch
On 14/01/2020 10:50 a.m., peter dalgaard wrote: On 14 Jan 2020, at 16:21 , Duncan Murdoch wrote: On 14/01/2020 10:07 a.m., peter dalgaard wrote: Yep, that looks wrong (probably want to continue discussion over on R-devel) I think the culprit is here (in src/nmath/choose.c) if (k

Re: [Rd] Model object, when generated in a function, saves entire environment when saved

2020-01-29 Thread Duncan Murdoch
rmal_lm()) [1] 532614827 > #> [1] 4163 > save_size_qs(normal_ggplot()) [1] 417967987 > #> [1] 857446 > save_size_rds(normal_ggplot()) [1] 532624477 > #> [1] 12895 Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Default for checkBuilt in update.packages() should be TRUE

2020-02-24 Thread Duncan Murdoch
f its many dependencies haven't been updated). The default should be TRUE, even though this will lead to some packages being updated unnecessarily, because the cost of an unnecessary update is so much less than the cost of missing a necessary update. Dunc

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Duncan Murdoch
far more users than tables does, so changing the name of your special functions or the corresponding regular functions could be a huge headache. Perhaps there's a way to set a flag before evaluating the function in the formula, and generate a warning if survival::strata is called wh

Re: [Rd] dput()

2020-02-29 Thread Duncan Murdoch
On 29/02/2020 4:19 a.m., Ben Bolker wrote: I think Robin knows about FAQ 7.31/floating point (author of 'Brobdingnag', among other numerical packages). I agree that this is surprising (to me). To reframe this question: is there way to get an *exact* ASCII representation of a numeric value

Re: [Rd] dput()

2020-03-02 Thread Duncan Murdoch
ll possible without '2)', but '2)' would allow to use dput(*, control = "All") which is somewhat easier to readers & writers. I think 1) is a good idea, and adding something with the meaning of AllHex seems useful: but that's not a name I'd choose, since

Re: [Rd] substitute inconsistent output

2020-03-18 Thread Duncan Murdoch
it's the printing that is inconsistent. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] stringsAsFactors

2020-04-12 Thread Duncan Murdoch
. However, setting options(stringsAsFactors = NULL) reverts to the same behavior as the old options(stringsAsFactors = TRUE). Is this intentional? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to find detritis rejected by "R CMD check" on Debian?

2020-04-17 Thread Duncan Murdoch
for the filename to write to, and have the example write to tempdir() instead of the current directory? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Use of MathJax (or something similar) in .Rd files

2020-04-30 Thread Duncan Murdoch
This sounds promising. Also remember that user-defined macros are possible, so even if you need a lot of contortions to enter the code, you can simplify it at the Rd level. Duncan Murdoch On 30/04/2020 5:50 a.m., Gábor Csárdi wrote: You can probably already do this using the \if{html

Re: [Rd] Use of MathJax (or something similar) in .Rd files

2020-04-30 Thread Duncan Murdoch
ut{<tt>src="<url-to-your-site>/mathjax/tex-chtml.js">}} Duncan Murdoch Best, Wolfgang -Original Message- From: Gábor Csárdi [mailto:csardi.ga...@gmail.com] Sent: Thursday, 30 April, 2020 11:51 To: Viechtbauer, Wolfgang (SP) Cc: r-devel Subject: Re: [Rd] Use o

Re: [Rd] Request: tools::md5sum should accept connections and finally in-memory objects

2020-05-01 Thread Duncan Murdoch
The tools package is not for users, it's for functions that R uses in installing packages, checking them, etc. If you want a function for users, it would belong in utils. But what's wrong with the digest package? What's the argument that R Core should take this on? Duncan Mu

Re: [Rd] Use of MathJax (or something similar) in .Rd files

2020-05-05 Thread Duncan Murdoch
ere, since it works so well as a contributed package already. Duncan Murdoch On 05/05/2020 9:11 a.m., Viechtbauer, Wolfgang (SP) wrote: Hi All, After some tinkering, and with support from Duncan, I put together a package that allows for easy inclusion of MathJax equations in Rd files. The packa

Re: [Rd] defining r audio connections

2020-05-06 Thread Duncan Murdoch
eBin equivalents specific to your library wouldn't be any harder than creating a connection. For those, you will probably want to work with an "external pointer" (see Writing R Extensions). Rcpp probably has support for these if you're working in C++. Duncan Murdoch __

[Rd] Testing before release (was: edit() doubles backslashes when keep.source=TRUE)

2020-05-15 Thread Duncan Murdoch
ws(package = "R-3") table(R3$Version, R3$Category) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Daily News about R-devel/NEWS is not updating

2020-05-15 Thread Duncan Murdoch
ow fixed. (The issue was that R-devel on the news machine didn't have rJava installed; the highlighting of differences is done by some old Java code.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Duncan Murdoch
eally old function is too hard to accommodate, and they should back it out, maybe by making a new function with the new signature. Or you could make a new function with the old signature, and use that instead of apply(). Duncan Murdoch On 22/05/2020 6:26 a.m., Lukas Lehnert via R-devel w

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Duncan Murdoch
function(X, FUN, bySI = NULL, ..., simplify = TRUE) { ? Yes, that sounds like an ideal solution. The docs can say it is ignored in old versions and passed on in new ones. Duncan Murdoch Henrik On Fri, May 22, 2020 at 6

Re: [Rd] constrOptim( ): conflict between help page and code

2010-06-17 Thread Duncan Murdoch
e interior of the feasible region, but the minimum may be on the boundary." The boundary is not in the interior. Duncan Murdoch The help page says The feasible region is defined by ‘ui %*% theta - ci >= 0’, but the R code for constrOptim reads if (any(ui %*% theta - ci &l

Re: [Rd] with(x, Recall()) Crash

2010-07-06 Thread Duncan Murdoch
se code, I thought I'd pass along the offending code. I've tested the crash on R 2.11.1 (on Linux and Mac), but not in devel versions of R. Thanks for posting that. It does still exist on R-devel, and as you say, it shouldn't. I'll fix it. Duncan Murdoch HTH, Rob

Re: [Rd] Large discrepancies in the same object being saved to .RData

2010-07-07 Thread Duncan Murdoch
riable in the current function. Since these are just pointers to the environment, this doesn't take up much space in memory, but when you save the object to disk, a copy of the whole environment will be made, and that can end up wasting up a lot of space if the environment contains a lot of th

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Duncan Murdoch
sing the infix operator syntax. (I think the description in the R Language Definition suggests this is not legal, since $$ is not a valid name, but it does currently work and that's unlikely to change.) Duncan Murdoch __ R-devel@r-project.or

Re: [Rd] Mysterious behavior

2010-07-09 Thread Duncan Murdoch
cal or the system survival library when I type search(), and .Autoloaded is NULL. Could you show us the result of .libPaths(), search(), searchpaths() and sessionInfo()? Duncan Murdoch I'm mystified as to how R decided to use that library, and what it was trying to pull from it. I

Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Duncan Murdoch
th so Windows can find it (there are other tricks, but they apply at the Windows level, not at the R level). I haven't tried this, but can't you use Sys.setenv() to change the PATH to what you want? Presumably you'll want to change it back afterwar

Re: [Rd] Large discrepancies in the same object being saved to .RData

2010-07-10 Thread Duncan Murdoch
On 10/07/2010 2:33 PM, Paul Johnson wrote: On Wed, Jul 7, 2010 at 7:12 AM, Duncan Murdoch wrote: On 06/07/2010 9:04 PM, julian.tay...@csiro.au wrote: Hi developers, After some investigation I have found there can be large discrepancies in the same object being saved as an external

Re: [Rd] Large discrepancies in the same object being saved to .RData

2010-07-10 Thread Duncan Murdoch
ronment of a function and what the pointer in a ‘EXTPTRSXP’ points to) is not included in the calculation." If you really want to know how much space an object will take when saved, probably the only reliable way is to save the object and look at how much space the file takes. Duncan Murd

Re: [Rd] Large discrepancies in the same object being saved to .RData

2010-07-11 Thread Duncan Murdoch
s an environment just as a closure does. In neither case does the print() method tell you about it -- but ?formula does. I've just changed the default print method for formulas to display the environment if it is not globalenv(), which is the rule used for cl

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-26 Thread Duncan Murdoch
umbering scheme... Duncan Murdoch Locale ID:1033 Additional Information 1: 8772 Additional Information 2: 9431192a7274b0ee769861df31ecee58 Additional Information 3: f768 Additional Information 4: 930d06d3f6aed4162dca7601993082f5 Anyone knows if there anything else I ca

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-26 Thread Duncan Murdoch
g called "userdump", but never tried it.) Duncan Murdoch /Henrik On Mon, Jul 26, 2010 at 1:30 PM, Duncan Murdoch wrote: > On 26/07/2010 5:15 AM, Henrik Bengtsson wrote: >> >> Just FYI: Problem remains (on same system) with "R version 2.12.0 >> Under de

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-28 Thread Duncan Murdoch
is shorter and then R.exe doesn't crash. This is that working PATH: Thanks, I can reproduce it now. Should be fixable. Duncan Murdoch C:\Program Files\Common Files\Microsoft Shared\Windows Live;c:\Rtools212\bin;c:\Rtools212\perl\bin;c:\Rtools212\MinGW\bin;c:\Rtools\bin;c:\Rtools\per

Re: [Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-07-28 Thread Duncan Murdoch
On 28/07/2010 11:06 AM, Duncan Murdoch wrote: On 28/07/2010 9:37 AM, Henrik Bengtsson wrote: > Hi, > > by pure luck, I discovered that it has to do with the number of > characters (or similar) in the Windows system environment variable > 'PATH'. I used a custom PATH

Re: [Rd] R CMD build wiped my computer (from R-help)

2010-07-29 Thread Duncan Murdoch
/ColorBrewer.R unlink RColorBrewer/R/ residuals.MCMCglmm.R xyz That certainly looks bad. I can't reproduce it on Windows; it doesn't allow that filename. So I'll have to leave this for a Unix-alike user. Duncan Murdoch unlink RColorBrewer/R/residuals.MCMCglmm.R unlink

Re: [Rd] transpose of complex matrices in R

2010-07-30 Thread Duncan Murdoch
)))} else {return(base::t(x))}} (This fails because of infinite recursion, but I don't quite understand why). You should call base::t.default, not base::t. Then this will work. The same solution fixes the one below, though you won't even need the base:: prefix on t.default. Duncan M

Re: [Rd] Disappearance of the file "NEWS"

2010-08-03 Thread Duncan Murdoch
HTML) I think it would not be a good idea to put a stub in place of the NEWS file. Sometimes the stub would be newer than the source NEWS.Rd file (depending on how the source had been obtained), and make would skip it: so we'd have to force it to be made every time, necessary or not. D

Re: [Rd] problem with dl tag in tools::Rd2HTML

2010-08-05 Thread Duncan Murdoch
e that the starts, then starts, then end the paragraph, but the has not ended yet. I don't really understand in html, but I think the correct way would be -- save.defaults, save.image.defaults: see save. -- Michael What version are you using? I don't see that in current R patc

Re: [Rd] problem with dl tag in tools::Rd2HTML

2010-08-05 Thread Duncan Murdoch
On 05/08/2010 5:18 PM, Michael Lachmann wrote: Duncan Murdoch-2 wrote: What version are you using? I don't see that in current R patched. I see this in version 2.11.1. This is the code I ran to generate it: page <- utils:::.getHelpFile(?options) tools::Rd2HTML(page,out="t.h

Re: [Rd] [R-SIG-Mac] Question about line type in contour() function (R 2.11.1)

2010-08-06 Thread Duncan Murdoch
On 05/08/2010 8:46 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: On Aug 5, 2010, at 5:20 PM, Duncan Murdoch wrote: On 05/08/2010 7:18 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: I'm running R 2.11.1 (MacBook Pro and OS X 10.6.4) and am trying to set a line type i

Re: [Rd] [R-SIG-Mac] Question about line type in contour() function (R 2.11.1)

2010-08-06 Thread Duncan Murdoch
On 06/08/2010 7:52 AM, Duncan Murdoch wrote: On 05/08/2010 8:46 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: On Aug 5, 2010, at 5:20 PM, Duncan Murdoch wrote: On 05/08/2010 7:18 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote: I'm running R 2.11.1 (MacBook Pro and OS X 1

Re: [Rd] parent.frame(1) of a S4 method is not a calling environment.

2010-08-17 Thread Duncan Murdoch
on" in the signature. Slightly unpleasant, though. You could use formulas for that. If you pass in formula = ~ x + y*z then environment(formula) will be the right evaluation environment, and formula[[2]] will be the unevaluated x + y*z. Duncan Murdoch Standardised, simpler syntax lik

[Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-19 Thread Duncan Murdoch
he named chunk. I'd like to drop the option, so that the default behaviour (which has always been equivalent to "expand = TRUE") would be the only behaviour. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-19 Thread Duncan Murdoch
On 19/08/2010 3:17 PM, Marc Schwartz wrote: On Aug 19, 2010, at 2:07 PM, Duncan Murdoch wrote: > I am trying to improve the error reporting in Sweave documents, so that if you have a syntax error in a code chunk, it will tell you which line of your input file contained the error. >

Re: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-19 Thread Duncan Murdoch
On 19/08/2010 4:29 PM, Claudia Beleites wrote: I never used it. I got curious, though. What would be a situation that benefits of this option? When I put it in, I thought it would be for people who were writing about Sweave. Duncan Murdoch Maybe a use case could be found by "

Re: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-19 Thread Duncan Murdoch
or (syntax error at this point, maybe some other kinds of error in the future) in the <> chunk, but that chunk wasn't eval'd, mainloop was eval'd. So the error is going to be reported as occurring in chunk mainloop, but with a line number from somewhere else in the file. Is t

Re: [Rd] Sweave <<*, showWarnings=TRUE>> ?

2010-08-20 Thread Duncan Murdoch
sn't taken advantage of in many places. If that is expanded, my Sweave changes should take advantage of it automatically. Duncan Murdoch In a course on "using R" (for beginners), I would really like to show warnings that code chunks produce. Currently, the warnings are printed to the c

Re: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-30 Thread Duncan Murdoch
On 19/08/2010 5:25 PM, Duncan Murdoch wrote: On 19/08/2010 5:07 PM, Kevin Coombes wrote: > I use it, frequently. The idea for it goes back to some of Knuth's > original literate programming ideas for developing weave and tangle when > he was writing TeX (the program). I want

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