Re: [Rd] Status of reserved keywords and builtins

2013-12-12 Thread Duncan Murdoch
On 13-12-12 3:22 PM, Duncan Murdoch wrote: On 12/12/2013 2:08 PM, Karl Millar wrote: According to http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words if else repeat while function for in next break TRUE FALSE NULL Inf NaN NA NA_integer_ NA_real_ NA_complex_

Re: [Rd] Proper way to drop 'srcref' from an expression created via substitute(function() ...)?

2013-12-12 Thread Duncan Murdoch
3 $ : symbol * $ : num 2 $ : symbol x Function definitions get srcrefs. Second, what is the proper way to drop that 'srcref' element in 'exprA'? I can think of either exprC <- exprA exprC[[4L]] <- NULL That should be best. Duncan Murdoch or exprC <- parse(t

Re: [Rd] Status of reserved keywords and builtins

2013-12-13 Thread Duncan Murdoch
lways be. I would much prefer that the compiler code were made smarter about detecting this rather than adding exceptions to the language design. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] In-string variable/symbol substitution: What formats/syntax is out there?

2013-12-17 Thread Duncan Murdoch
The equivalent of your example above would be rgl:::subst("pi = %pi%, 2pi = %twopi%", pi = pi, twopi = 2*pi) i.e. general expressions aren't supported, just specific named substitutions. Duncan Murdoch Thanks Henrik PS. The following is on the borderline because it does not do a

Re: [Rd] Symlinks when building R on windows

2013-12-18 Thread Duncan Murdoch
nd Administration manual. In particular, *do not* run configure. If you do choose to create a Cygwin build, please make sure it passes the tests before you use it. I haven't seen one that does. Duncan Murdoch I am stuck at the moment, because the build process tries create symlink

Re: [Rd] Fwd: Bad \usage lines question

2013-12-18 Thread Duncan Murdoch
= 10, posthoc = "std.pearson.residuals.sign", assoc = ifelse("univariate" Notice how the line above differs from your source -- the % signs are taken as comment markers. You need to escape them. Duncan Murdoch list(c("N", "alpha.X2", "uc.1

Re: [Rd] Fwd: How to check if R interpreter is initiated

2013-12-20 Thread Duncan Murdoch
After initializing R, set it to 1. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Symlinks when building R on windows

2013-12-30 Thread Duncan Murdoch
during the construction of the colorspaces list, which calls make.rgb later in that same file. You could insert print() or message() statements to localize the error, but it's not an error that should have happened in a valid build. Duncan Murdoch I hope this is not too offtopic with the i

Re: [Rd] Symlinks when building R on windows

2014-01-02 Thread Duncan Murdoch
that is a little tricky, but should be doable. First, work out whether R_FunTab is corrupted or not. If it is, then set a hardware breakpoint to see when it happened. If not, then you have to wait until the La_solve primitive is created, then set a hardware breakpoint on it. Good luck

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Duncan Murdoch
for a solution for Sweave. You are running with the strip.white option set to TRUE. That strips blank lines at then beginning and end of each output piece. Just set strip.white=FALSE. Duncan Murdoch Cheers Kirill \documentclass{article} \begin{document} <>= cat("a\n") ca

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Duncan Murdoch
On 14-01-02 7:53 PM, Kirill Müller wrote: On 01/03/2014 01:45 AM, Duncan Murdoch wrote: You are running with the strip.white option set to TRUE. That strips blank lines at then beginning and end of each output piece. Just set strip.white=FALSE. Thanks, the code below works perfectly. I have

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-02 Thread Duncan Murdoch
On 14-01-02 8:04 PM, Kirill Müller wrote: On 01/03/2014 01:59 AM, Duncan Murdoch wrote: But results=tex is not the default. Having defaults for one option depend on the setting for another is confusing, so I think the current setting is appropriate. True. On the other hand, I cannot imagine

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Duncan Murdoch
It's dishonest to quote me out of context. Duncan Murdoch On 14-01-03 3:40 AM, Kirill Müller wrote: On 01/03/2014 02:34 AM, Duncan Murdoch wrote: Carriage returns usually don't matter in LaTeX I'd rather say they do. One is like a space, two or more end a paragraph and star

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Duncan Murdoch
On 14-01-03 4:57 AM, Martin Maechler wrote: Kirill Müller on Fri, 3 Jan 2014 02:04:06 +0100 writes: > On 01/03/2014 01:59 AM, Duncan Murdoch wrote: >> But results=tex is not the default. Having defaults for >> one option depend on the setting

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Duncan Murdoch
fault than "true", I think it would be more likely to cause trouble than to solve it. Duncan Murdoch -Kirill On 01/03/2014 11:39 AM, Duncan Murdoch wrote: It's dishonest to quote me out of context. Duncan Murdoch On 14-01-03 3:40 AM, Kirill Müller wrote: On 01/03/2014 02:34

Re: [Rd] Sweave trims console output in "tex" mode

2014-01-03 Thread Duncan Murdoch
On 03/01/2014 7:32 AM, Kirill Müller wrote: On 01/03/2014 01:06 PM, Duncan Murdoch wrote: > On 14-01-03 5:47 AM, Kirill Müller wrote: >> I'm sorry, I didn't mean to be rude. Do you prefer including the entire >> original message when replying? Or perhaps I misunderst

Re: [Rd] Support for long arrays

2014-01-05 Thread Duncan Murdoch
. Duncan Murdoch I am trying to create a large array using: d = c(1e+10,2) a=array(0,d) This results in the error: Error in array(0, d) : negative length vectors are not allowed In addition: Warning message: In array(0, d) : NAs introduced by coercion Note that I can create a vector of the same

Re: [Rd] Support for long arrays

2014-01-06 Thread Duncan Murdoch
On 14-01-06 4:12 PM, Boris Aronshtam wrote: Jay, Duncan, Thank you for your replies. The confusing part for me is that vector allows large indices, while array does not allow. See section 12 of the R Internals manual for a discussion of the issues. Also, is there an estimate when R would

Re: [Rd] Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?

2014-01-07 Thread Duncan Murdoch
just not where you were looking. You can get them as follows: f <- getMethod("initialize", "MyClass") getSrcref(unRematchDefinition(f)) This should work for the other cases too, where unRematchDefinition does nothing. I don't know if there are any cases where it will fail, but if there are, please let me know. Probably the getSrcref function should do this automatically when it sees that f is a method definition, but I'll wait to hear if it's the wrong approach. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?

2014-01-08 Thread Duncan Murdoch
this a while, I decided that it's really a bug that getSrcref didn't do this automatically. So now it does (in R-patched and R-devel). Duncan Murdoch Thanks again Markus 2014/1/8 Duncan Murdoch mailto:murdoch.dun...@gmail.com>> On 14-01-07 2:40 PM, Markus Müller wro

Re: [Rd] formals() adds 0 to complex function arguments

2014-01-19 Thread Duncan Murdoch
s2i <- 1+2i test <- function(a = Cplx_1plus2i){} Less sneaky, but a tiny bit different due to scoping issues: if the function happens to assign something to a local variable Cplx_1plus2i before evaluating a, the local variable will be used rather than the global

Re: [Rd] formals() adds 0 to complex function arguments

2014-01-19 Thread Duncan Murdoch
On 14-01-19 4:45 PM, Duncan Murdoch wrote: On 14-01-19 4:16 PM, peter dalgaard wrote: It's not formals() that is doing you in. Rather, it is a conspiration between two things: (a) R always displays complex constants as x+yi, even if x is zero and (b) there really is no way to specify co

Re: [Rd] Using unicode from C interface of R

2014-01-21 Thread Duncan Murdoch
t use mkCharCE instead of mkChar, as described in Writing R Extensions. If it is in UTF-16 you might have more trouble because of possible embedded 0 bytes. Translate to UTF-8 first using C facilities like WideCharToMultibyte. Duncan Murdoch __ R-de

Re: [Rd] package NAMESPACE question

2014-01-25 Thread Duncan Murdoch
was the function that you *did* want to export and document. multiply was the function you wanted to keep local. So you should export timestwo, and not multiply. You will then need to document timestwo, but you won't need to document multiply. That will work. Duncan Murdoch Thanks ag

Re: [Rd] package NAMESPACE question

2014-01-26 Thread Duncan Murdoch
s is hugely incomplete. Please stop wasting everyone's time, and post something reproducible. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Trouble installing package in development version of R

2014-01-26 Thread Duncan Murdoch
?SHLIB, and it will tell you that -n will give you some diagnostic information. You can also try R CMD SHLIB --help to see a bit more. One other thing you can do if you need to ask here again, is to post system and version information printed by R by sessionInfo(). And please don't p

Re: [Rd] package NAMESPACE question

2014-01-26 Thread Duncan Murdoch
On 14-01-26 9:34 AM, Axel Urbiz wrote:> Hi Duncan, > > My most sincere apologies. It's really not my intention to waste anyones > time. More the opposite...for some reason I thought that the problem had > to do with my call to options() and thought that would be enough

Re: [Rd] package NAMESPACE question

2014-01-28 Thread Duncan Murdoch
it's not the way that the terms function works, so you'll need to do more work yourself, including specifying what the evaluation rules should be in case a variable occurs in more than one of those locations. Duncan Murdoch Thanks, Axel. #mycodefiles <- c("cmt.R&q

Re: [Rd] package NAMESPACE question

2014-01-28 Thread Duncan Murdoch
one in the namespace will take precedence. In most cases users don't want that. The problem is that in order to make the user one take precedence, you could modify the parent of the environment of the formula, but that's bad too (because it will have global effects since enviro

Re: [Rd] package NAMESPACE question

2014-01-28 Thread Duncan Murdoch
On 28/01/2014 2:43 PM, William Dunlap wrote: [inline below] Bill Dunlap TIBCO Software wdunlap tibco.com > -Original Message- > From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] > Sent: Tuesday, January 28, 2014 10:45 AM > To: William Dunlap; Axel Urbiz; Henrik Bengt

Re: [Rd] package NAMESPACE question

2014-01-29 Thread Duncan Murdoch
user defines a tt function, will coxph use theirs, or yours? I'd say the answers for situations like this should be "yes" and "theirs", but that's not true of my tables package, where answers to the corresponding questions would be "yes" and "mine"

[Rd] Solution to inconsolata problems in MikTeX

2014-01-31 Thread Duncan Murdoch
g both updates seems to have fixed things. Duncan Murodch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Running examples with R5 constructor from package failing

2014-02-01 Thread Duncan Murdoch
lob, but the docs don't make it clear to me that this also implies export of the generator function. So I'd add export(Blob) to your NAMESPACE. I just checked another package that exports a class, and it separately exported the generator function, so I guess this is known. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Running examples with R5 constructor from package failing

2014-02-01 Thread Duncan Murdoch
does use setRefClass. I don't think it uses exportClass though... Duncan Murdoch > > Thanks for your help. > > On 02 Feb, 2014,at 12:57 AM, Duncan Murdoch > wrote: > >> On 14-01-31 10:14 PM, Imanuel Costigan wrote:> I am having an issue with >> reference c

Re: [Rd] String Vector Encoding

2014-02-03 Thread Duncan Murdoch
On 14-02-03 3:41 AM, Saptarshi Guha wrote: Hello, I was reading through serialize.c and i couldn't answer something. In readItem, case CHARSXP, rules exists to adjust the read string for string encoding. This is described in the R Internals manual. Duncan Murdoch Q1. I couldn&#

Re: [Rd] Fwd: linker issue

2014-02-03 Thread Duncan Murdoch
lem, you should contact the maintainer of that package. If it's not just a devtools problem and you still need help, you need to describe what you did in more detail. What is your PATH? What about other environment variables? What version of R are you using? What version of Rtools?

Re: [Rd] suggestion for "sets" tools upgrade

2014-02-07 Thread Duncan Murdoch
hat you mean by your functions, and put them in a package, along with examples where they give more useful results than the standard definitions. I think the current base package functions match the mathematical definitions better. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
possible non-missing value that would give anything else when added to NaN, but the answer should not depend on the order of operands.) However, I get the same as you in 64 bit 3.0.2. All calculations I've shown are on 64 bit Windows 7. Duncan Murdoch The aggregate package is availa

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
easier; I don't know if that's trivial or hard. Duncan Murdoch > hex(NA_real_) [1] "7FF007A2" > hex(NA_real_+1) [1] "7FF807A2" > hex(NaN) [1] "7FF8" This is with 64-bit R (on OS X Mavericks, R-devel r64910), as we

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
Similarly, the standard doesn't say which bit pattern propagates when you do binary operations on two NaNs. That's why sometimes NA + NaN is NA, and sometimes NaN. Duncan Murdoch On 32-bit R-2.15.3: NA: 7ff807a2 NaN: 7ff8 On 64-bit version of R-2.15.3 NA: 7f

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Duncan Murdoch
n his/her search list, maybe there's a reason for that, and mypackage::foo shouldn't mess with it. I think the real problem is that loading the mypackage namespace isn't enough to get the functions within it to work. Duncan Murdoch In the following thread, it's stated th

Re: [Rd] Sweave provides a misleading error when vignette engine not fully specified

2014-03-05 Thread Duncan Murdoch
haven't tried that. But somehow you need to tell R where the knitr engine lives. Also for what its worth Sweave'ing still fails to produce graphics output Now that sounds unrelated. Duncan Murdoch https://stat.ethz.ch/pipermail/r-devel/2014-February/068414.html $ R --versi

Re: [Rd] Create dataframe in C from table and return to R

2014-03-06 Thread Duncan Murdoch
normal dataframe. Dataframe columns are vectors all of a type. You want the first row to be a string, the second row to be an integer. You can't do that with simple atomic columns, and you probably don't want to mess with the alternative (which

Re: [Rd] version numbers for CRAN submissions that give warnings/notes

2014-03-06 Thread Duncan Murdoch
, and I'd recommend bumping the version number. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Fwd: C code and DLL file in the package

2014-03-13 Thread Duncan Murdoch
. Put the C code for the DLL in "src" (not "SRC"). R will compile it for the platform where your package is being installed. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problems building package vignette: Sweave requires multiple passes to build document.

2014-03-14 Thread Duncan Murdoch
in this, then post a simplified sample package and someone else will be able to see if they have the same problem as you, and perhaps fix it. Duncan Murdoch If (1) is not possible, any suggestions how to auto-generate a crude generic bibtex .bib file from my existing document? Bac

Re: [Rd] Does R ever move objecsts in memory?

2014-03-16 Thread Duncan Murdoch
t may be duplicated and the result after the change will be at a new location. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Duncan Murdoch
ch to obtain packages. The only objection I can see to this is that it requires extra work by the third party, rather than extra work by the CRAN team. I don't think the total amount of work required is much different. I'm very unsympathetic to proposals to dump work on others. Duncan

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-20 Thread Duncan Murdoch
suggestion seems like an ideal solution to this problem. Any CRAN mirror could implement it. If someone sets this up and commits to maintaining it, I'd be happy to work on the necessary changes to the install.packages/update.packages code to allow people to use it from within R. Duncan

Re: [Rd] Memcheck: error in a switch using getGraphicsEvent

2014-03-20 Thread Duncan Murdoch
[1]-1 paramChoice['xy']<-xy }else{paramChoice['toDo'] <- ""} }, "Down" = { if(xy[1] It can also return NULL, but to be sure, why not print the value? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-26 Thread Duncan Murdoch
ckage S3 generic into an S4 generic. Clearly they should not be creating separate generics, there's just one. I don't know if there's something wrong with the way apcluster or BiocGenerics are doing things, or something wrong with the way the methods package is creating the generic,

Re: [Rd] internal string comparison (Scollate)

2014-03-27 Thread Duncan Murdoch
or unequal strings, and users are likely to get messed up by that, or to submit bogus bug reports. And it's not impossible to work around: if you can collect the universe of strings to compare in advance, then just use order() to convert them to integer values, and compare those. Dunc

Re: [Rd] creating namespaces outside packages

2014-03-28 Thread Duncan Murdoch
cular context. So depending on what you are trying to accomplish, it may be fine to just set up an environment. Why do you think that won't work? Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] rgl question

2014-03-31 Thread Duncan Murdoch
rgl.* function that set the lty property to dashed. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] rgl question

2014-03-31 Thread Duncan Murdoch
gy) if you want the equivalent of lines3d but with the persistant material properties. I had forgotten that, because I never use the rgl.* functions. I would say "neither should you", but there might be some good reason to do so. Duncan Murdoch I'm using R 3.1.0 alpha On Mo

Re: [Rd] Package vignettes share the same environment?

2014-04-05 Thread Duncan Murdoch
ave the functions in the package that it needs, so they've already lost reproducibility. Duncan Murdoch $ R --version|head -n 3 R version 3.1.0 RC (2014-04-05 r65379) -- "Spring Dance" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (

Re: [Rd] R 3.1.0: 'R CMD Sweave' deletes non tex files created upon batch mode exit

2014-04-15 Thread Duncan Murdoch
pre-release versions. Duncan Murdoch Thanks again. Regards, Marc On Apr 14, 2014, at 7:28 AM, Martin Maechler wrote: Marc Schwartz on Sun, 13 Apr 2014 10:22:55 -0500 writes: [on the R-SIG-Mac mailing list] : Hi all, With R version 3.1.0 on OSX, using either the Snow

Re: [Rd] R 3.1.0: 'R CMD Sweave' deletes non tex files created upon batch mode exit

2014-04-15 Thread Duncan Murdoch
On 15/04/2014 8:12 AM, peter dalgaard wrote: On 15 Apr 2014, at 13:14 , Duncan Murdoch wrote: > On 14/04/2014, 10:23 AM, Marc Schwartz wrote: >> Hi Martin, >> >> Thanks for your confirmation on this. >> >> I normally do not use R CMD Sweave, as I too ru

Re: [Rd] ASCIIfy() - a proposal for package:tools

2014-04-17 Thread Duncan Murdoch
ate package with a maintainer who is willing to take this on. Duncan Murdoch On 15/04/2014 1:48 PM, Arni Magnusson wrote: Hi all, I would like to propose the attached function ASCIIfy() to be added to the 'tools' package. Non-ASCII characters in character vectors can be problematic f

Re: [Rd] type.convert and doubles

2014-04-17 Thread Duncan Murdoch
e was announced there more than a year ago (http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2013/03/19), and has shown up several times since as minor edits have been made to the announcement. Duncan Murdoch Here's my use case: I have a function that pulls arbitrary financial data

Re: [Rd] ASCIIfy() - a proposal for package:tools

2014-04-17 Thread Duncan Murdoch
On 17/04/2014 12:47 PM, Gregory R. Warnes wrote: Hi Arni, I’ll be glad to drop ASCIIfy into gtools. Let me know if this OK. Thanks, that sounds like a great solution if Arni doesn't want his own package. Duncan Murdoch -Greg On Apr 17, 2014, at 9:46 AM, Duncan Murdoch

Re: [Rd] rgl rotations

2014-04-17 Thread Duncan Murdoch
the "model's z-axis" is parallel to the z axis in the box around the plot. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] type.convert and doubles

2014-04-20 Thread Duncan Murdoch
uotes must have no effect on the interpretation. Duncan Murdoch How about something like this: - if it is quoted (and not specified otherwise in colClasses), then it is a character/factor - if it is not quoted (and not specified otherwise in colClasses), then the type is automatically detected, ac

Re: [Rd] R 3.1.0: 'R CMD Sweave' deletes non tex files created upon batch mode exit

2014-04-21 Thread Duncan Murdoch
search (since r-patched builds aren't archived), and few would test r-devel. Duncan Murdoch Thereby they would automatically be using the latest ("devel") versions of base packages in the same way as they currently test their script/project/package to work with the latest ("

Re: [Rd] The regular expressions in compareVersion()

2014-04-24 Thread Duncan Murdoch
dda6d84880c0 A link to your report would be more useful, if it included an example where the bad regexp causes trouble. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] The regular expressions in compareVersion()

2014-04-24 Thread Duncan Murdoch
On 24/04/2014, 5:26 PM, Henrik Bengtsson wrote: On Thu, Apr 24, 2014 at 1:42 PM, Duncan Murdoch wrote: On 24/04/2014, 1:11 PM, Yihui Xie wrote: Hi, I guess the backslash should not be used as the separator for strsplit() in compareVersion(), because the period in [.] is no longer a

Re: [Rd] The regular expressions in compareVersion()

2014-04-25 Thread Duncan Murdoch
get missed again. If nobody else gets to it first I'll deal with it. I don't see any value in fixing the compareVersion example, but if someone submits a bug report about it, someone else might fix it. Duncan Murdoch On Apr 24, 2014, at 10:15 PM, Yihui Xie wrote: You are right

Re: [Rd] Please make Pre-3.1 read.csv (type.convert) behavior available

2014-04-26 Thread Duncan Murdoch
needless to say, is disruptive for us. (Actually, it was downright shocking.) It wouldn't have been a shock if you had tested pre-release versions. Commercial users of R should be contributing to its development, and that's a really easy way to do so. Duncan Murdoch +1 f

Re: [Rd] The regular expressions in compareVersion()

2014-04-26 Thread Duncan Murdoch
revent it from being expanded. After a bit more testing, I'll re-commit the fixes. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Please make Pre-3.1 read.csv (type.convert) behavior available

2014-04-26 Thread Duncan Murdoch
On 26/04/2014, 12:28 PM, Tom Kraljevic wrote: Hi Duncan, Please allow me to add a bit more context, which I probably should have added to my original message. We actually did see this in an R 3.1 beta which was pulled by an apt-get and thought it had been released accidentally. From my user

Re: [Rd] Please make Pre-3.1 read.csv (type.convert) behavior available

2014-04-26 Thread Duncan Murdoch
tation; can you confirm that your Java code reads it and writes the same string? This is about 1% bigger than the limit at which type.convert switches to strings or factors. Duncan Murdoch Below is the R output from adding one row at a time to “bad.csv”. The last attempt results in a facto

Re: [Rd] Please make Pre-3.1 read.csv (type.convert) behavior available

2014-04-26 Thread Duncan Murdoch
On 26/04/2014, 6:40 PM, Tom Kraljevic wrote: Hi Duncan, This program and output should answer your question regarding java behavior. Basically the character toHexString() representation is shown to be lossless for this example (in Java). Please let me know if there is any way I can help

Re: [Rd] type.convert and doubles

2014-04-27 Thread Duncan Murdoch
d to a number should be converted to a factor. Yes, that's a bad default, but some people rely on it. Duncan Murdoch Hadley On Saturday, April 26, 2014, Martin Maechler wrote: Simon Urbanek > on Sat, 19 Apr 2014 13:06:15 -0400 writes: > On Apr 19, 2014, at 9

Re: [Rd] "Name partially matched in data frame"

2014-04-30 Thread Duncan Murdoch
tions("warning.expression"), but I don't see how... Duncan Murdohc __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to test if an object/argument is "parse tree" - without evaluating it?

2014-05-01 Thread Duncan Murdoch
isn't R terminology. Could you give an example of one call that passes a parse tree, and one that doesn't? Duncan Murdoch Currently, I do various rather ad hoc eval()+substitute() tricks for this that most likely only work under certain circumstances. Ideally, I'm looking for a

Re: [Rd] backtrace while trying to clear workspace

2014-05-02 Thread Duncan Murdoch
? Looks like something has a "finalizer", but it doesn't work. To be more specific, I'd have to see it, i.e. you'd have to give us instructions to reproduce. Duncan Murdoch #13 0x2afd612f in Rf_eval (e=0x1448d68, rho=0x16c6780) at eval.c:399 #14 0x2a

Re: [Rd] Historical NA question

2014-05-06 Thread Duncan Murdoch
are higher precedence in R. The other assignment operators are ordered as <<-, ->, (<-, _) in the blue book (where parens indicate equal precedence), but in R they are (->, ->>), (<-, <<-), =. Also surprising: > quote(!2+!2) !2 + (!2) where it is somewhat p

Re: [Rd] precedence (was 'historical NA question')

2014-05-07 Thread Duncan Murdoch
. Is there a language where "- 2^2" gives a different answer than "-2^2"? (Substitute ** or any other exponentiation operator for ^ if you like.) This is important, because I'd like to avoid ever attempting any important calculation in that language. Duncan Murdo

Re: [Rd] Access variable in attached but removed object

2014-05-09 Thread Duncan Murdoch
to the environment using as.environment("org:variables"), and access it within that. For example, assign("test", 24, pos="org:variables") or e <- as.environment("org:variables") e$test <- 24 Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Replay plot not allowed across sessions.

2014-05-11 Thread Duncan Murdoch
e what you want to do is to save the code and data that produced each plot. Then at least if functions change you can edit your saved copy and still get a plot. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] legitimate use of :::

2014-05-13 Thread Duncan Murdoch
you can convince him that giving you access is worth the trouble of exposing some of it to user-level code, then he'll export a function for you. (I think it's unlikely to be .win32consoleCompletion, but who knows.) Duncan Murdoch (full quote because of the age of the tread) Kin

Re: [Rd] SEXPTYPEs

2014-05-16 Thread Duncan Murdoch
ws a warning with an incompatible pointer type, because pointers should be integers of course). I've looked at all SEXPTYPEs in the R internals, and the only one specific to integer vectors is INTSXP. Can this be used for vectors of length larger than 32-bit? Yes, see the section on "Long Ve

Re: [Rd] citEntry handling of encoded URLs

2014-05-23 Thread Duncan Murdoch
caping) while others treat it as text (i.e., need escaping). Personally, I would hence avoid the problem and only use the DOI URL here as this will be robust across BibTeX styles. Nevertheless it is not ideal that there is a discrepancy between the different printing styles. I think currently this c

Re: [Rd] Ellipsis to Two Functions When One Has Nested Functions

2014-05-28 Thread Duncan Murdoch
27;t try to call formals() to work it out at run-time. Another way is to have an argument like "control" in optim(), and ask the user to pass one set of options via that, and the other via ... . You'd use do.call() again to construct that call. Duncan Murdoch

Re: [Rd] R CMD check for the R code from vignettes

2014-06-01 Thread Duncan Murdoch
On 02/06/2014, 1:41 PM, Carl Boettiger wrote: Thanks both for the replies. Duncan, I'm sorry if I wasn't clear. I am indeed writing a vignette using Sweave (knitr actually), and I want it to be a vignette. I'm well aware that I can dodge these tests as you suggest, or through

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Duncan Murdoch
one in the vignette. That's a useful thing to be able to do. Duncan Murdoch Regards, Yihui -- Yihui Xie Web: http://yihui.name On Mon, Jun 2, 2014 at 10:19 AM, Paul Gilbert wrote: On 06/02/2014 12:16 AM, Gabriel Becker wrote: Carl, I don't really have a horse in this race ot

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Duncan Murdoch
On 03/06/2014, 4:12 AM, Gavin Simpson wrote: On 2 June 2014 11:44, Duncan Murdoch mailto:murdoch.dun...@gmail.com>> wrote: On 03/06/2014, 12:58 AM, Yihui Xie wrote: Please also note that I do not expect R core or CRAN maintainers to do any extra work: p

Re: [Rd] R CMD check for the R code from vignettes

2014-06-02 Thread Duncan Murdoch
proper use of inline expressions. The latter. I do not think it is trivial to improve the tangle function so that it can generate an R script that fully reproduce what was done in weave. Now you are being nitpicky. Duncan Murdoch Inline expressions are not the only thing that need improveme

Re: [Rd] rgl pinch and zoom under Windows 8.1

2014-06-04 Thread Duncan Murdoch
). rgl has no support for pinch gestures, so your OS is translating the message into something else, which rgl is acting on. I'd guess it's the scroll wheel. So I guess you should see if you can configure it to translate to the opposite direction of rotation. Dunc

Re: [Rd] R CMD check for the R code from vignettes

2014-06-04 Thread Duncan Murdoch
sider the issue closed. Duncan Murdoch (adjectives on personal pronouns instead of nouns in a discussion is a sign for me to quit in my eyes). I'm fine with optional tangling, and I believe one should not expect to reproduce results generated by weave using a different approach, namely

Re: [Rd] regression bug with getParseData and/or parse in R-3.1.0

2014-06-12 Thread Duncan Murdoch
there for most of a year before being reported. Please people, test pre-release versions. Duncan Murdoch > > For reference, with R-3.0.2: > >> getParseData(parse(text = "{1}", keep.source = TRUE)) > line1 col1 line2 col2 id parent token terminal text > 7

Re: [Rd] Should a package that indirectly Suggests: a vignette engine pass R CMD check?

2014-06-14 Thread Duncan Murdoch
h BiocStyle that would need its suggestions. However, I don't think it's worth complicating the check code to support this. If you need knitr to be present to build your vignettes, why not just declare it explicitly? Duncan Murdoch > > This is only with a recent R. In detai

Re: [Rd] index.search

2014-06-16 Thread Duncan Murdoch
also worth mentioning that there is something similar to test for changes to vignettes: If there is a target output file .Rout.save in the vignette source directory, the output from running the code in that vignette is compared with the target output file and any differences are reported

Re: [Rd] R CMD check warning with S3 method

2014-06-20 Thread Duncan Murdoch
fficient > and not a best way to maintain. Did I miss anything in the R-exts > manual? Only that you can have a link to the help page in the other package, e.g. \code{\link[emdbook]{curve3d}} You'll still need to copy the required parts, but you can link to the original for the rest

Re: [Rd] r65998 build error. share/Rd/macros/*: No such file or directory

2014-06-22 Thread Duncan Murdoch
gt; my make output is here: > https://www.dropbox.com/s/q7ylkw00re7riaf/make > and my config.log is here: > https://www.dropbox.com/s/0w09zhds9q6253n/config.log Just a missed commit, now fixed. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Unfixed bugs in latest R-patched

2014-06-24 Thread Duncan Murdoch
It's hardly fair to call these "unfixed bugs". Most of them are better described as "unreported bugs", or, after this posting, "bugs reported with insufficient detail". We can't fix them if we don't know what they are, and it's not easy to d

Re: [Rd] Unfixed bugs in latest R-patched

2014-06-24 Thread Duncan Murdoch
On 24/06/2014, 1:40 PM, Radford Neal wrote: > On Tue, Jun 24, 2014 at 09:20:30AM +0200, Duncan Murdoch wrote: >> It's hardly fair to call these "unfixed bugs". Most of them are better >> described as "unreported bugs", or, after this posting, "bugs rep

Re: [Rd] Unfixed bugs in latest R-patched

2014-06-24 Thread Duncan Murdoch
On 24/06/2014, 10:26 PM, Radford Neal wrote: >> Duncan Murdoch: >> >> No, I don't think it's reasonable to expect you to write a patch, but >> reporting the bugs in the R bug reporting system isn't that hard to do, >> and does lead to fixes pret

Re: [Rd] R CMD check warning with S3 method

2014-06-29 Thread Duncan Murdoch
> exportFrom(utils, help) > > Then: > >> getNamespaceInfo("ReexportingPackage", "exports")$help > [1] "help" > attr(,"origin") > [1] "utils" > > Comments? I don't see why this is needed. What does it gain over documenting tha

Re: [Rd] Building R on Windows: mkdir of Rtools creates directories with read-only permissions [WEIRD]

2014-06-30 Thread Duncan Murdoch
ld an R installer and I seem to be stuck... I have seen this, but I don't see it on every machine. One one where I do see it is the Windows builder machine in Dortmund. The following is inserted into the script after building the 32 bit build cacls %name32% /T /E /G VORDEFINIERT\Benut

<    9   10   11   12   13   14   15   16   17   18   >