Displaying 20 results from an estimated 6000 matches similar to: "0 ^ NaN == Inf, why?"
2008 Oct 25
1
R echoes integer literals incorrectly, under certain conditions (PR#13204)
Full_Name: Stephen Milborrow
Version: R 2.8.0
OS: Windows XP
Submission from: (NULL) (81.159.65.46)
Under certain conditions, R 2.8.0 incorrectly echoes integer literals without
the "L" suffix. R 2.7.2 is ok.
To reproduce, create two files as follows:
a.R containing: source("b.R", echo=TRUE)
b.R containing: x <- 1L
Now execute: Rterm --vanilla --silent <a.R
This
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",",
header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT)
Please: Show me the tree.
Mark
-------- Original Message --------
Subject: Re: [R] help with rpart
From: "Stephen Milborrow" <[1]milbo at sonic.net>
2015 Jun 26
1
[R-pkg-devel] Guidelines for S3 regression models
Stephen,
thanks for your effort. The more appropriate list for this discussion is
probably R-devel (as far as I understand it) so I've moved the discussion
there.
Related topics have already been discussed in the past. Specifically, I
remember contributions by Paul Johnson ("rockchalk" package) and John Fox
("effects" and "car" package) as their packages
2007 Aug 29
1
Modifying R_CheckStack for a speed increase
Greetings R developers,
R will run a little faster when executing "pure R" code if the function
R_CheckStack() is modified.
With the modification, the following code for example runs 15% faster
(compared to a virgin R-2.5.1 on my Windows XP machine):
N = 1e7
foo <- function(x)
{
for (i in 1:N)
x <- x + 1
x
}
2008 Oct 25
0
R echoes integer literals incorrectly, under certain conditions (PR#13205)
On 25/10/2008 10:45 AM, milbo at sonic.net wrote:
> Full_Name: Stephen Milborrow
> Version: R 2.8.0
> OS: Windows XP
> Submission from: (NULL) (81.159.65.46)
>
>
> Under certain conditions, R 2.8.0 incorrectly echoes integer literals without
> the "L" suffix. R 2.7.2 is ok.
>
> To reproduce, create two files as follows:
> a.R containing:
2011 Apr 14
0
Postscript can be very slow in R 2.13-0
Viewing certain postscript files under R 2.13-0 is very slow, at least using
GSview on my 64 bit Windows 7 system. To see this, compare how long it
takes to display these two files (fast.ps was created by removing the /srgb
stuff in .ps.prolog):
www.milbo.org/postscript/slow.ps
www.milbo.org/postscript/fast.ps
The code to produce the above two files is here:
2008 Jan 16
0
Just-in-time compiler for R
Greetings R developers!
I have been working on a just-in-time compiler for R arithmetic expressions.
An example:
jit(1) # turn on just-in-time compilation
for(i in 1:na) # example convolution code
for(j in 1:nb)
ab[i + j] <- ab[i + j] + a[i] * b[j]
The loop will run about 30% faster. That's not much of a speedup, but the
code
2008 Apr 12
4
HOW TO AVOID LOOPS
> Looking for a simple, effective a minimum execution time solution.
>
> For a vector as:
>
> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1)
>
To transform it to the following vector without using any loops:
> (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,2,3,4,5,6)
>
Appreciate any suggetions.
[[alternative HTML version deleted]]
2015 Sep 14
1
Optimization bug when byte compiling with gcc 5.2.0 on windows
On Mon, Sep 14, 2015 at 8:49 PM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
> I tested this hypothesis by replacing '__GNUC__ <= 4' with '__GNUC__
> <= 5' and rebuilding R, but this introduces a whole lot of problems
> that were not there before. In particular R crashes when using the
> graphics device, which it did not without this fix.
I found
2011 Jul 21
1
Error: bad index in plotmo functions for MARS model (package earth)
Hello all useRs,
I am tring make a simple surface plot ( 2 by 2 terms of a MARS model
(with earth package)
but I get the follow error message:
> plotmo( mars )
Error: bad index (missing column in x?)
I don't no how to workround this... :-(
I thanks in advanced by some help!
Thanks.
Cleber
###############
>
> ### example code:
> library( earth )
> data( gasoline,
2013 Nov 08
2
Earth (MARS) package with categorical predictors
It appears to be legitimate to include multi-level categorical and continuous variables in defining the model for earth (e.g. y ~ cat + cont1 + cont2) but is it also then possible use categoricals in the predict method using the earth result? I tried but it returns an error which is not very informative.
Thanks
Chris
2012 Jul 31
2
phantom NA/NaN/Inf in foreign function call (or something altogether different?)
Dear experts,
Please forgive the puzzled title and the length of this message - I
thought it would be best to be as complete as possible and to show the
avenues I have explored.
I'm trying to fit a linear model to data with a binary dependent
variable (i.e. Target.ACC: accuracy of response) using lrm, and
thought I would start from the most complex model (of which
"sample1.lrm1" is
2011 Jun 26
2
Issue with dataset inclusion in CRAN packages
I was glad to see the new rpart.plot package by Stephen Milborrow. I was
however a bit concerned that Stephen distributed a dataset I created, and
renamed the dataset (from titanic3 to ptitanic) in the process [with some
justification, as some variables were omitted]. Fortunately Stephen
included the script he used to download the dataset from our web site, and
gave full credit to us. What
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
Hi Everyone,
I posted this a couple of weeks ago with no responses. My interface (via
gmane) seemed a bit flakey at the time, so I'm venturing to repost with some
additional information.
I'm trying to write selfStart non-linear models for use with nls. In these
models some combinations of parameter values are illegal; the function value
is undefined.
That's OK when calling the
2009 Jun 11
1
Error in 1:p : NA/NaN argument when running model comparisons
Hi there,
I am trying to compare nonlinear least squares regression with AIC and anova. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves).
Both models run fine, but when I try to produce an AIC value for the second model I get the error:
> AIC(pow.nls1)
[1] 114408.3
> AIC(pow.nls2)
Error in
2015 Sep 14
2
Optimization bug when byte compiling with gcc 5.2.0 on windows
On 14/09/2015 9:36 AM, luke-tierney at uiowa.edu wrote:
> I believe the issue is that on Windows the sqrt function when called
> with a NaN does not return the same NaN, as it does on other platforms.
> We have
>
> #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \
> __GNUC__ <= 4
> # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
> #else
2008 Aug 06
1
error in installing R packages
Hello,
I am trying to install R packages under linux, some of the packages can
not be installed and I got the following error, could anybody give me
suggestion on where the problem is and how to fix it? Thanks-e
> .libPaths()
[1] "/usr/lib64/R/library"
[2] "/usr/share/R/library"
[3]
2013 Jul 13
2
missing PROTECT() in src/main/arithmetic.c
at lines 651 & 653 (integer_binary function):
if (code == DIVOP || code == POWOP)
ans = allocVector(REALSXP, n);
else
ans = allocVector(INTSXP, n);
There are calls to warningcall() later in the function, which can
trigger garbbage collection.
Looks like the typical scenario where it seemed pretty safe to not
PROTECT in the original version of the function but
2013 Feb 04
4
rJava works with 32-bit but not 64
Hello:
rJava works for me under 32-bit but under not 64-bit R; see below.
Suggestions?
Thanks,
Spencer
> library(rJava)
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: stop("No CurrentVersion entry in '", key, "'! Try re-installing
Java and make sure R and Java have matching architectures.")
2011 Mar 30
2
problem with png() and large dimensions on some 32-bit Windows machines
Hello,
I encountered this:
> png(file=tempfile(), width=1165, height=12983)
Error in png(file = tempfile(), width = 1165, height = 12983) :
unable to start png() device
In addition: Warning messages:
1: In png(file = tempfile(), width = 1165, height = 12983) :
Unable to allocate bitmap
2: In png(file = tempfile(), width = 1165, height = 12983) :
opening device failed
>
On the