> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Patrick Burns
> Sent: Sunday, June 20, 2010 3:08 AM
> To: r-devel@r-project.org
> Subject: [Rd] proposed change to 'sample'
>
> There is a weakness in the 'sample'
> function t
> -Original Message-
> From: Peter Dalgaard [mailto:pda...@gmail.com]
> Sent: Sunday, June 20, 2010 2:12 PM
> To: William Dunlap
> Cc: Patrick Burns; r-devel@r-project.org
> Subject: Re: [Rd] proposed change to 'sample'
>
> William Dunlap wrote:
> &g
In modelling functions some people like to use
a weight of 0 to drop an observation instead of
using a subset value of FALSE. E.g.,
weights=c(0,1,1,...)
instead of
subset=c(FALSE, TRUE, TRUE, ...)
to drop the first observation.
lm() and summary.lm() appear to treat these in the
same way, decr
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Olaf Mersmann
> Sent: Friday, July 30, 2010 3:01 AM
> To: Robin Hankin
> Cc: R-devel@r-project.org; Martin Maechler
> Subject: Re: [Rd] transpose of complex matrices in R
>
> H
R's predict.lm() fails when trying to compute
term-wise confidence (or prediction) intervals
for a subset of the terms in a model:
> dat <- data.frame(y=log(1:10), x=1:10,
fac=rep(LETTERS[11:13],c(3,3,4)))
> fit <- lm(y~fac*x, data=dat)
> # can compute intervals for all terms
> pfit <- predict(fit
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Nicholas
> L Crookston
> Sent: Friday, August 06, 2010 8:35 AM
> To: Michael Lachmann
> Cc: r-devel-boun...@r-project.org; r-devel@r-project.org
> Subject: Re: [Rd] rbind on da
Should there be a [[<-.factor() that either throws
an error or acts like [<-.factor() to avoid making
an illegal object of class factor?
> z <- factor(c("Two","Two","Three"), levels=c("One","Two","Three"))
> z
[1] Two Two Three
Levels: One Two Three
> str(z)
Factor w/ 3 levels "On
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Arni Magnusson
> Sent: Wednesday, September 08, 2010 11:55 AM
> To: r-devel@r-project.org
> Cc: Simon Urbanek
> Subject: [Rd] Drop single-dimensional array
>
> Hi Simon, thank
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of cstrato
> Sent: Monday, September 13, 2010 2:08 PM
> To: r-devel@r-project.org
> Subject: [Rd] Problem with WARNING...headers with CRLF line endings
>
> Dear all,
>
> When ru
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Janko Thyson
> Sent: Thursday, September 16, 2010 11:19 AM
> To: r-de...@r-project. org
> Subject: Re: [Rd] a small suggestion for improving the
> building of packages
...
> Dear Uwe,
> in principle, I to
One of the complaints in your stackoverlow references
concerned doBy::transformBy and the error message came
from eval(). Using eval() means you are throwing the
usual scoping rules out the window and making up some
new ones. Using a non-core package means you are at
the mercy of its writer.
In
He said to use options(error=...) instead of
tryCatch(error=...). In C++ lingo, the handler
set by options("error") is called when the exception
is thrown while tryCatch's handler is called
when it is caught.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
>
I find system.file() handy for writing examples,
but if the user mistypes its arguments or if a
package is not up to date its return value of ""
can lead to trouble. This forces the example to
be wordier than I'd like.
E.g., the following example works
> scan(what="", sep="\n", system.file("DES
The traceback looks very similar to a problem
in R 2.11.1 reported earlier this month by Troy Robertson.
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Troy Robertson
> Sent: Wednesday, October 06, 2010 6:13 PM
> To: 'r-devel@R-project.org'
>
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Andrew Piskorski
> Sent: Thursday, October 28, 2010 6:48 AM
> To: Simon Urbanek
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] must .Call C functions return SEXP?
>
> On Thu,
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Hadley Wickham
> Sent: Wednesday, December 01, 2010 6:27 AM
> To: Martin Maechler
> Cc: r-de...@stat.math.ethz.ch
> Subject: Re: [Rd] RFC: sapply() limitation from vector to
>
I was writing some assertion tests for modelling-related
code I had written and was surprised to see one test
fail because the "specials" attribute of the output of
terms() is a "pairlist" instead of a "list". In 2.12.0
I get:
> dput(attr(terms(y~Spec(x1)+x2, specials=c("Spec")), "specials"))
I'm agnostic at this point about the recycling rules
for logical subscripting, but I've been coming around
to thinking that x[logicalSubscript] should only return
the values of x such that the corresponding value
of logicalSubscript is TRUE. Values in logicalSubscript
of NA and FALSE should be tre
In R 2.12.0 I get
> d <- data.frame(x=1:10, y=log(1:10), f3=LETTERS[rep(1:3,c(3,3,4))])
> m <- model.frame(y~.^2, data=d)
> formula(m)
y ~ x + f3
In S+ formula(m) gives formula given to model.frame(),
but in R you have to do the following get that formula:
> formula(attr(m, "terms"))
y
I have a function to search through R code
and look for certain language constructs.
It uses the idiom
if (is.recursive(object)) {
object <- as.list(object)
for(element in object) {
Recall(element) # recurse further into object
}
}
and I was surprised tha
When weighted.residuals() is given a fitted model
object with several responses (class mlm) and some
zero weights it returns a vector instead of a matrix.
It looks like it is doing
resids[ weights != 0 ]
instead of
resids[ weights != 0, , drop=FALSE]
in the multi-response case.
E.g.,
> d4
p tibco.com
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
> Sent: Wednesday, January 19, 2011 6:50 AM
> To: William Dunlap
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] formula(model.frame(y~.^2, data=d)) does
> not return formula fro
I was looking for all the glm-related 'family' functions
in stats using the following predicate that returns TRUE
for any function whose first argument is called "link".
is.family <- function(object) is.function(object) &&
identical(names(as.list(object))[1], "link")
It threw an err
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Hadley Wickham
> Sent: Wednesday, February 16, 2011 7:32 AM
> To: Tim Hesterberg
> Cc: Henrik Bengtsson; r-devel@r-project.org
> Subject: Re: [Rd] matrixStats: Extend to arrays
> -Original Message-
> From: h.wick...@gmail.com [mailto:h.wick...@gmail.com] On
> Behalf Of Hadley Wickham
> Sent: Wednesday, February 16, 2011 9:21 AM
> To: William Dunlap
> Cc: Tim Hesterberg; Henrik Bengtsson; r-devel@r-project.org
> Subject: Re: [Rd] matrixSt
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Terry Therneau
> Sent: Monday, February 21, 2011 11:32 AM
> To: r-devel@r-project.org
> Subject: [Rd] Anomaly in [.terms
>
>
> This arose when working on an addition to coxp
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Vadim Ogranovich
> Sent: Monday, March 14, 2011 10:37 AM
> To: 'r-devel@r-project.org'
> Subject: [Rd] discrepancy between lm and MASS:rlm
>
> Dear R-devel,
>
> There seems t
When split's x argument has a class attribute and the
grouping vector, f, is shorter than x then split gives
the wrong result. It appears to not extend f to the length
of x before doing the split. E.g.,
> split(factor(letters[1:3]), "Group one") # expect all 3 elements in
the single group
$
(a) In R 2.12.2 rowsum can overflow if given an integer input:
> rowsum(c(2e9L, 2e9L), c("a", "a"))
[,1]
a -294967296
> 2^32 + .Last.value
[,1]
a 4e+09
Should it be changed to coerce its x argument to numeric
(double precision) so it always returns a numeric output?
(b) When
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Jon Clayden
> Sent: Tuesday, March 29, 2011 5:46 AM
> To: r-devel@r-project.org
> Subject: [Rd] Reading 64-bit integers
>
> Dear all,
>
> I see from some previous threads tha
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Simon Urbanek
> Sent: Tuesday, March 29, 2011 6:49 PM
> To: Duncan Murdoch
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] Reading 64-bit integers
>
>
> On Mar 29, 2011, at 8
data.frame[[row,col]] unclasses its output. Is that proper?
> d <- data.frame(num=1:4,
fac=factor(letters[11:14],levels=letters[1:15]),
date=as.Date("2011-04-01") + (0:3),
lt=as.POSIXlt("2011-04-01") + (0:3)*1e5,
pv=package_version(c("1.2-3", "4.5","6.7", "
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch
> Sent: Friday, April 08, 2011 8:16 AM
> To: Joshua Ulrich
> Cc: R-devel@r-project.org
> Subject: Re: [Rd] duplicates() function
>
> On 08/04/2011 11:08 AM, Josh
If x has an S3 class then sort.int(x) returns a value
without an S3 class but which has the is.object flag set,
which, I think, causes identical() give a false/misleading
report:
> x <- structure(1:3, class="unrecognizedClass")
> y <- sort.int(x)
> t <- 1:3
> identical(y, t) # expect TRUE
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of William Dunlap
> Sent: Monday, April 11, 2011 10:10 AM
> To: R-devel@r-project.org
> Subject: [Rd] sort.int(S3object) strips class but not the
> is.obje
With R-2.12.2 on Linux:
> z <- data.frame(Version=package_version(c("0.1")),
row.names=c("pkgA"))
> all.equal(z, z) # expect TRUE
Error: evaluation nested too deeply: infinite recursion /
options(expressions=)?
> traceback()
... lots of lines in a 3-cycle ...
6: all.equal.list(target,
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Martin Morgan
> Sent: Wednesday, April 20, 2011 9:56 AM
> To: R-devel@r-project.org
> Subject: [Rd] Make as.factor an S3 generic?
>
> as.factor / as.ordered is not written as a
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Martin Maechler
> Sent: Friday, April 29, 2011 7:25 AM
> To: Paul Johnson
> Cc: r-devel
> Subject: Re: [Rd] median and data frames
> [ ... lots of lines elided ... ]
> My vote is for deprecating mean.data
Am I misunderstanding rawConnections here or are
rawConnections not working right yet? It looks
like I can use seek() to position the read pointer
but readBin does not position the read pointer past
what has just been read.
> myRawTen <- as.raw(101:110)
> str(myRawTen)
raw [1:10] 65 66 67
> f <- function(...) {
+ dotArgList <- substitute(list(...))
+ dotArgList
+ }
> f(cat("foo\n"), stop("Oops"), warning("Hmm"))
list(cat("foo\n"), stop("Oops"), warning("Hmm"))
> # i.e., no argument was evaluated
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Messa
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: William Dunlap
> Sent: Wednesday, May 25, 2011 11:20 AM
> To: 'Peter Danenberg'
> Cc: r-devel@r-project.org
> Subject: RE: [Rd] External special functions (SPEC
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Michael Lawrence
> Sent: Wednesday, June 01, 2011 9:15 AM
> To: r-devel@r-project.org
> Subject: [Rd] possibly invalid assertion in setRefClass?
>
> > setRefClass("Foo", fields
I agree with Simon that package startup messages
are often annoying and not often helpful. However,
I think they should be generated with
packageStartupMessage("your message")
instead of
cat("your message\n")
The former may be suppressed by wrapping the call to
library() with suppressPackage
If x contains an NA then filter(x, f, method="recursive")
puts NA's and 0.0's in the output in an odd pattern.
It puts NA's in the length(f) positions ending at the position
of the input NA and it puts a run of length(f) 0.0's starting
at the position immediately after the input NA. The values
aft
Did you actually see some rounding differences?
The lm objects made in the calls to maklm will
differ in the environments attached to the formula
(because you made the formula in the function). If
I change both copies of that .Environment attribute
to .GlobalEnv (or any other environment), then i
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf Of Duncan Murdoch
> Sent: Monday, August 29, 2011 5:30 PM
> To: Gabriel Becker
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] Out-of-date manual or small bug in R CMD check?
>
>
Is it intentional that the digit 8 is allowed
in octal escape sequences in character literals?
> "\110" == "\088"
[1] TRUE
> "\8" == "\b"
[1] TRUE
9's are rejected, so I'd expected 8's to be illegal as well.
> "\9"
Error: '\9' is an unrecognized escape in character string starting "\
Shouldn't the parser complain about unfinished strings in files?
It doesn't and will tack on a newline if there isn't one there.
> withOption <- function(optionList, expr) {
+ oldOption <- options(optionList)
+ on.exit(options(oldOption))
+ expr
+ }
> cat(file=tf<-tempfil
Software
wdunlap tibco.com
> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
> Sent: Thursday, September 01, 2011 5:30 PM
> To: William Dunlap
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] "\088" is legal syntax?
>
> On 11-09-
uot;,
./relax/R/weaveR.R:
input<-chartr("\283\244\283\266\283\274\283\204\283\226\283\234",
./relax/R/weaveR.R:# pc<-eval(parse(text='"\\283"')) # UTF-8-pre-char
./relax/R/weaveR.R:
'"\\283\\244\\283\\266\\283\\274\\283\\204\\283\\226
longitude", "latitude", "magnitude", "time",
"depth", "trans.time")
")
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
> Sent: Friday,
What is the rationale for nobs.lm omitting observations with
zero weights while nobs.glm includes them?
> df <- data.frame(x1=log(1:10), x2=1/(1:10), y=1:10,
> wt=c(0,2,0,4,0,6,7,8,9,10))
> nobs(lm(data=df, y~x1+x2, weights=wt))
[1] 7
> nobs(glm(data=df, y~x1+x2, weights=wt))
[1] 10
The anova me
dir(all=TRUE) returns the file names "." and ".."
while dir(recursive=TRUE, all=TRUE, include.dirs=TRUE)
does not. I always filter out the "." and ".." entries
and was wondering if anyone would mind if dir(all=TRUE)
just omitted them? It might make recursive file operations
like cleaning out a di
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf Of Terry Therneau
> Sent: Monday, October 03, 2011 11:44 AM
> To: Simon Urbanek
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] number of copies
>
>
> On Mon, 2011-10-03 at 12:31
I don't like the idea of having a length-1 dim attribute trigger some
behavior of sample. (Should a length-2 dim cause it to sample
rows of a matrix, as unique() and duplicated() do?).
S+'s sample() had another argument, 'n', that could be used to
specify the size of the population to sample from
> ... adding the ability to concat
> strings with '+' would be a relatively simple addition (no pun intended)
to
> the code base I believe. With a lot of other languages supporting this
kind
> of concatenation, this is what surprised me most when first learning R.
Wow! R has a lot of surprising f
"+" uses
> sprintf("%s is %d", c("One","Two"), numeric(0))
character(0)
> sprintf("%s is %d", c("One","Two"), 17)
[1] "One is 17" "Two is 17"
> sprintf("%s is %d", c("One"
I am curious why you used evalq instead of eval in this code.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Jul 15, 2015 at 11:49 AM, Dayne Filer wrote:
> Hello,
>
> I upgraded from 3.1.2 to 3.2.1 and am receiving errors on code that worked
> as I intended previously. Briefly, I am using
> the error I gave when run on 3.2.1.
>
> To give credit, I received the idea for using evalq from SO:
> http://stackoverflow.com/a/22559385
>
> Dayne
>
>
> On Wed, Jul 15, 2015 at 3:29 PM, William Dunlap wrote:
>
>> I am curious why you used evalq instead of
2015-03-09) vs. R version 3.2.0 (2015-04-16)`
[1] "3 string mismatches"
I prefer the new semantics, but it is a change.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Jul 15, 2015 at 1:25 PM, David Winsemius
wrote:
>
> On Jul 15, 2015, at 12:51 PM, William Dunlap wrote:
>
gt; the output or result). Using the above code still results in the x object
>> not being stored in fenv on 3.1.2.
>>
>> Dayne
>>
>> On Wed, Jul 15, 2015 at 4:40 PM, William Dunlap
>> wrote:
>>
>>> Another aspect of the change is (
>> Just a quick question: what's the difference between `[.Date` and
`[[.Date`?
>> Is it supposed to be the method for accessing the value right?
>
>For Dates and atomic vectors in general they are the same, but ...
Even for atomic vectors with names they are not quite the same
> c(One=1, Two
Does R have a function like the S/S++ unset() function?
unset(name) would remove 'name' from the current evaluation
frame and return its value. It allowed you to safely avoid
some memory copying when calling .C or .Call.
E.g., suppose you had C code like
#include
#include
SEXP add1(SEXP p
> Does R have a function like the S/S++ unset() function?
That should be 'S+' or 'S-Plus', not the typo 'S++'.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Aug 21, 2015 at 1:43 PM, William Dunlap wrote:
> Does R have a function like the S/S++ u
match(x,table) and x%in%table work when x and table are lists of language
objects or expressions. E.g.,
expression(quote(1+2), quote(log2(16))) %in% expression(3, quote(1+2),
c(4L,5L,6L,7L))
#[1] TRUE FALSE
list(quote(1+2), quote(log2(16))) %in% list(3, quote(1+2), c(4L,5L,6L,7L))
#[1]
dy seems to do the right thing in that case:
duplicated(x)
#[1] FALSE FALSE
duplicated(x[c(1,2,1)])
#[1] FALSE FALSE TRUE
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Aug 26, 2015 at 1:54 AM, Martin Maechler wrote:
> >>>>> William Dunlap
> >>>>&g
## delete trailing slashes
dts <- function(name) gsub("/$", "", name)
if(!file.exists(dts(any_name))) { ...
I don't think you want to delete the slash in "C:/" on Windows,
as "C:" is not a file and "C:/" is. normalizePath() does odd things
with "C:" as well.
Bill Dunlap
TIBCO Software
I can reproduce the problem by running R-3.2.0 (on Windows),
installing copula from CRAN,
and then using it:
> install.packages("copula")
Installing package into 'C:/Program Files/R/R-3.2.0/site-library'
(as 'lib' is unspecified)
also installing the dependencies 'gsl', 'ADGofTest', 'pspline'
Warn
I just noticed that read.table() and type.convert() interpret the string "i"
as a missing value of type complex.
> str(read.table(text=c("i\ni\ni\ni\n")))
'data.frame': 4 obs. of 1 variable:
$ V1: cplx NA NA NA ...
> str(type.convert("i"))
cplx NA
If there are other strings in
3, if you care.
>
> (Funny how an obscure issue goes unnoticed for a decade, then pops up
> twice independently within a few months. A property of the Poisson process,
> I suppose.)
>
>
> > On 07 Oct 2015, at 22:22 , William Dunlap wrote:
> >
> > I just noticed tha
MM> but I don't think we'd want to
MM> change all.equal.language() at this point in time
Although it would be nice if all.equal looked at least at attributes of
formulas
so we did not get results like
> form <- y ~ x1 %in% x2
> all.equal(form, terms(form))
[1] TRUE
> all.equal(terms(y~x1
Is it just me, or did a corrupt PACKAGES.gz file get installed in the
bin/windows/contrib/3.2 directory of CRAN mirrors recently? gzfile()
complains about it and Cygwin's gzip cannot decompress it. I tried the
following
repos <- "https://cran.rstudio.com";
v <- "3.2"
pkgs.gz <- paste(sep="/", re
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sat, Nov 7, 2015 at 12:24 AM, Uwe Ligges wrote:
> Bill,
>
> thanks for reporting, this is currently true for all PACKAGES.gz files my
> autobuilder is creating, will investigate.
>
> Best,
> Uwe
>
>
>
> On 06.11.201
Most packages that use the R_MakeExternalPtr function use
Rf_install("pkgSpecificString") for its 'tag' argument (if they don't use
R_NilValue). A few use Rf_mkChar("pkgSpecificString").
Is there any reason to prefer one over the other?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
_
When options("warn") is 0, the default, the warning is not
printed until capture.output is done. Use warn=1 to capture
the warnings as messages:
> options(warn=0)
> txt0 <- capture.output({message("A message"); warning("A warning")},
> type="message")
Warning message:
In eval(expr, envir, enclos
As a side note, Splus makes sin(x) NA, with a warning, for
abs(x)>1.6*2^48 (about
4.51e+14) because more than half the digits are incorrect in sin(x)
for such x. E.g.,
in R we get:
> options(digits=16)
> library(Rmpfr)
> sin(4.6e14)
[1] -0.792253849684354
> sin(mpfr(4.6e14, precBits=500))
1 'mpfr
This would be easier if base::set.seed() accepted a value of .Random.seed
instead of just a scalar integer or, new to R-3.0.0, NULL. If set.seed()
returned the
previous value of .Random.seed (NULL if there was no previous value) things
might be even easier. People should not have to know where .
You can also read the process map table in /proc//maps to see which
shared object is associated with the illegal address that valgrind identified.
Read the map table after each load or unload of a *.so with
map <- readProcessMaps()
and use something like
subset(map, startAddr <= badAddr & bad
> should I rewrite my C code using Call in R?
Yes, rewrite it to use the .Call() interface.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf
> Of Tee-Jay-Ardie
> Sent: We
Should the F statistic be the same when using add1() on models created by lm
and glm(family=gaussian)?
They are in the single-degree-of-freedom case but not in the
multiple-degree-of-freedom case.
MASS:addterm shows the same discrepancy. It looks like the deviance
(==residual sum of squares) ge
If you are on a Unix-like machine try using the setsid command to
run your command in a 'session' of its own. E.g.,
> z <- pipe("setsid /usr/bin/yes", open="r")
> length(readLines(z, n=1e6))
[1] 100
> # hit control-C
> length(readLines(z, n=1e6))
[1] 100
> length(readLines(z
> Is there any reason right-assign with "->" still exists? How much
> code on CRAN uses it, and how trivially could it be excised?
I use '->' a lot when doing interactive work. I often first run a command
to see its printed output then decide that I had better save its value.
The up-arrow key gi
ssage-
> From: peter dalgaard [mailto:pda...@gmail.com]
> Sent: Friday, July 05, 2013 11:25 AM
> To: William Dunlap
> Cc: Barry Rowlingson; R-devel
> Subject: Re: [Rd] should the text for RIGHT_ASSIGN be -> in getParseData()?
>
>
> On Jul 5, 2013, at 18:59 , William Dun
com]
> Sent: Friday, July 05, 2013 12:11 PM
> To: William Dunlap
> Cc: peter dalgaard; R-devel; Barry Rowlingson
> Subject: Re: [Rd] should the text for RIGHT_ASSIGN be -> in getParseData()?
>
> Here are two more standard emacs bindings that work: Ctrl-K to cut and
> Ctrl
> I meant what is the design principle behind check.names being hardcoded to
> FALSE.
> I see no conflict with the purpose of cbind from the ability to specify
> check.names
> at the level of cbind.
One rationale is that data.frame(check.names=TRUE,...) does two things: it makes
sure there are n
> my own programming variant looks even nicer,
>is.matrix(m) %or% "m is not a matrix but a {{class(m)}}"
But it does not act nicely. All %anything% constructs have the
same precedence, that of %*%. Hence
x==3 %or% "x is not three"
is parsed as
x == ( 3 %or% "x is not three" )
which is
Here is a problem I ran across in RStudio, which uses masks a number of
standard R functions with versions that do a bit more than the original does.
The RStudio people have figured out a way to prevent default values of
arguments from being found when an argument is missing from a call!
junk1
I used to worry about the order of evaluation of on.exit expressions and
thought that maybe we needed named on.exit expression so you could
remove particular on.exit expressions. However, now I think I can almost
always
avoid such considerations and make code clearer by making a new function cal
Is there an R-language interface to the R API C-language functions
Rf_logspace_add()
and Rf_logspace_sub()? I don't see one but I may not looking under the
right name.
Various packages have functions which do that same sort
of thing (log(exp(x)+exp(y)) and log(exp(x)-exp(y)) without unnecessary
> "Currently, the CRAN package repository features 5001 available packages."
>
> Going from 4000 to 5000 packages took 14.5 months - that's one new package
> every 10.5 hours. Behind every package there are real people. These
> user-contributed packages are maintained by ~2900 people [2] - that's
You can put the function of interest and any global
variables it needs into a private environment, which gets sent
along with the function to the child processes. E.g.
library(parallel)
cl3 <- makeCluster(3)
y <- c(1,100,1)
addY <- function(x) x + y
withGlobals <- function(FUN, ...){
envi
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
From: Yu Wan [mailto:walter...@126.com]
Sent: Friday, December 27, 2013 3:46 AM
To: William Dunlap; alex...@4dscape.com
Cc: r-devel@r-project.org
Subject: Re: [Rd] Parallel computing: how to transmit multiple parameters to a
function in parL
> I think that ignoring a terminal slash/backslash on Windows would do no
> harm:
Windows makes a distinction between "C:" and "C:/": the former is
not a file (or directory) and the latter is.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-devel-boun...@r-pr
You can more or less get what you want by reassigning the environment
of the formula to be a child of its original environment, where you put
your private functions in the new environment. For example, do not
export trt and make the following change to your R code:
% diff -u foo/R/cmt.R~ foo/R
[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 Bengtsson
> Cc: r-devel
> Subject: Re: [Rd]
Have you tried using the environment variable LD_DEBUG to
see what the dynamic linker is doing? E.g.,
env LD_DEBUG=files R
or
% setenv RHOME `R RHOME`
% R CMD env LD_DEBUG=files $RHOME/bin/exec/R
2322:
2322: file=libR.so [0]; needed by
/opt/sw/R/R-3.0.2.atlas1/lib/R/bin/ex
> In particular, updating a package with many reverse dependencies is a
> frustrating process, for everybody. As a maintainer with ~150 reverse
> dependencies, I think not twice, but ten times if I really want to publish
> a new version on CRAN.
It might be easier if more of those packages came wi
> Within an R session, type Sys.getenv() will list all the environment
> variables, but each one
> of them occupies about a page, so scrolling to find one is difficult. Is this
> because I don't
> know how to use it or something could be improved?
Attaching the class "simple.list" to the output
s looks bad. A print method
like
p <- function(x, ...)
{
cat(formatDL(x), sep="\n")
invisible(x)
}
would look better.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
> Sent: Sa
> This may have been asked before, but is there an elegant way to check
> whether an variable/argument passed to a function is a "parse tree"
> for an (unevaluated) expression or not, *without* evaluating it if
> not?
I doubt it.
Some packages say that if the argument is a formula then its right
1 - 100 of 499 matches
Mail list logo