similar to: R-devel Digest, Vol 62, Issue 24

Displaying 20 results from an estimated 3000 matches similar to: "R-devel Digest, Vol 62, Issue 24"

2008 Apr 23
0
poly() can exceed degree k - 1 for k distinct points (PR#11251)
The poly() function can create more variables than can be fitted when there are replicated values. In the example below, 'x' has only 5 distinct values, but I can apparently fit a 12th-degree polynomial with no error messages or even nonzero coefficients: R> x = rep(1:5,3) R> y = rnorm(15) R> lm(y ~ poly(x, 12)) Call: lm(formula = y ~ poly(x, 12)) Coefficients:
2008 Apr 22
1
Bug in poly() (PR#11243)
Full_Name: Russell Lenth Version: 2.6.2 OS: Windows XP Pro Submission from: (NULL) (128.255.132.36) The poly() function allows a higher-degree polynomial than it should, when raw=FALSE. For example, consider 5 distinct 'x' values, each repeated twice. we can fit a polynomial of degree 8: ===== R> x = rep(1:5, 2) R> y = rnorm(10) R> lm(y ~ poly(x, 8)) Call: lm(formula = y ~
2000 May 03
1
Bug report -- 1.0.1, HP-UX (PR#532)
Dear R folks, Additional problem... bug.report() failed, so am sending it from another mailer. The file it generated is appended. Thanks Russ -- Russell V. Lenth -- Department of Statistics & Actuarial Science The University of Iowa -- Iowa City, IA 52242 USA Tel (319)335-0814 -- FAX (319)335-3017 mailto:Russell-Lenth@uiowa.edu - http://www.stat.uiowa.edu/~rlenth/ ===== R.bug.report
2007 Aug 13
1
PR#9848
Oops -- I meant R version 2.5.1, not 1.5.1. My apologies. -- Russell V. Lenth, Professor Department of Statistics & Actuarial Science (319)335-0814 FAX (319)335-3017 The University of Iowa russell-lenth at uiowa.edu Iowa City, IA 52242 USA http://www.stat.uiowa.edu/~rlenth/
2006 Oct 13
3
No exit codes from RTerm (Windows) (PR#9296)
Full_Name: Russell V. Lenth Version: 2.3.1 OS: Windows XP Pro Submission from: (NULL) (128.255.132.188) I wrote a simple .BAT file to run the Sweave function on a file (via RTerm), then run pdflatex on the result (after RTerm exits). The issue is that if an error condition occurs in RTerm, it is prudent to not do the pdflatex processing afterward. Here are the relevant statements in the BAT
2000 Jan 21
1
DLLs using Borland
I wrote a DLL in C that does some MCMC stuff. It is compiled using Borland's C++ Builder, version 3.0 (build 3.70) on a Windows 98 machine. The DLL loads and runs just fine. But then if I subsequently call R's plot() function, I get an illegal operation message and R crashes. In fact, I've found that this happens even if I merely load the DLL, don't ever run it, and then try to
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Lionel, Thanks for your response. I understand that method overriding can be a serious issue, but as you say, this is not something that the user can act upon. Yet the message lands at the user?s feet. In my case, the messages are cluttering my package vignettes, and may or may not represent what users see if they themselves run the vignette code, depending on what version of ggplot2, etc. they
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Dear Russ, I had the same problem in my vignettes and setting both message and warning to FALSE seems to remove all unwanted output: ```{r message=FALSE, warning=FALSE} library("afex") library("ggplot2") library("cowplot") theme_set(theme_grey()) ``` Result: https://cran.r-project.org/web/packages/afex/vignettes/afex_plot_introduction.html Best, Henrik Am Di.,
2016 May 14
2
R external pointer and GPU memory leak problem
My question is based on a project I have partially done, but there is still something I'm not clear. My goal is to create a R package contains GPU functions (some are from Nividia cuda library, some are my self-defined CUDA functions) My design is quite different from current R's GPU package, I want to create a R object (external pointer) point to GPU address, and run my GPU function
2019 Jul 23
2
quiet namespace load is noisy
Dear R-devel, Consider the following clip (in R version 3.6.0, Windows): > requireNamespace("ggplot2", quietly = TRUE) Registered S3 methods overwritten by 'ggplot2': method from [.quosures rlang c.quosures rlang print.quosures rlang It seems to me that if one specifies 'quietly = TRUE', then messages about S3 method
2007 Dec 28
1
logistic mixed effects models with lmer
I have a question about some strange results I get when using lmer to build a logistic mixed effects model. I have a data set of about 30k points, and I'm trying to do backwards selection to reduce the number of fixed effects in my model. I've got 3 crossed random effects and about 20 or so fixed effects. At a certain point, I get a model (m17) where the fixed effects are like this
2007 Jan 25
1
poly(x) workaround when x has missing values
Often in practical situations a predictor has missing values, so that poly crashes. For instance: > x<-1:10 > y<- x - 3 * x^2 + rnorm(10)/3 > x[3]<-NA > lm( y ~ poly(x,2) ) Error in poly(x, 2) : missing values are not allowed in 'poly' > > lm( y ~ poly(x,2) , subset=!is.na(x)) # This does not help?!? Error in poly(x, 2) : missing values are not allowed in
2018 Jul 20
2
Model formulas with explicit references
Dear R-Devel, I seem to no longer be able to access the bug-reporting system, so am doing this by e-mail. My report concerns models where variables are explicitly referenced (or is it "dereferenced"?), such as: cars.lm <- lm(mtcars[[1]] ~ factor(mtcars$cyl) + mtcars[["disp"]]) I have found that it is not possible to predict such models with new data. For example:
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
This smells like a bug to me. The error is triggered by the line: variables <- eval(predvars, data, env) inside model.frame.default(). At that point, na.action has not been applied, so poly() ended being called on data that still contains missing values. The qr() that issued the error is for generating the orthogonal basis when evaluating poly(), not for fitting the linear model itself.
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
This smells like a bug to me. The error is triggered by the line: variables <- eval(predvars, data, env) inside model.frame.default(). At that point, na.action has not been applied, so poly() ended being called on data that still contains missing values. The qr() that issued the error is for generating the orthogonal basis when evaluating poly(), not for fitting the linear model itself.
2007 Nov 22
3
Naming elements of a list
I have a numeric vector of lenth 1. I am trying to use it inside a function just by giving its name, rather than specifying it as an argument to the function. I am aware that there is an attach function which you need to call. The attach function will accept a list. However, I don't seem to be able to create the list properly. (Or should I use a frame instead?) free_driver <- function (){
2008 Feb 13
1
use of poly()
Hi, I am curious about how to interpret the results of a polynomial regression-- using poly(raw=TRUE) vs. poly(raw=FALSE). set.seed(123456) x <- rnorm(100) y <- jitter(1*x + 2*x^2 + 3*x^3 , 250) plot(y ~ x) l.poly <- lm(y ~ poly(x, 3)) l.poly.raw <- lm(y ~ poly(x, 3, raw=TRUE)) s <- seq(-3, 3, by=0.1) lines(s, predict(l.poly, data.frame(x=s)), col=1) lines(s,
2007 Nov 07
3
Can I replace NA by 0 (if yes, how) ?
Hello, I'm trying to fit some points with a 8-degrees polynom (result of lm is stored in pfit). In most of the case, it is ok but for some others, some coefficients are "NA". I don't really understand the meaning of these "NA". And the problem is that I can't perform a derivation (pderiv<-as.function((deriv(polynomial(pfit$coefficients))))) on pfit due to the
2005 Jun 14
2
ordinary polynomial coefficients from orthogonal polynomials?
How can ordinary polynomial coefficients be calculated from an orthogonal polynomial fit? I'm trying to do something like find a,b,c,d from lm(billions ~ a+b*decade+c*decade^2+d*decade^3) but that gives: "Error in eval(expr, envir, enclos) : Object "a" not found" > decade <- c(1950, 1960, 1970, 1980, 1990) > billions <- c(3.5, 5, 7.5, 13, 40) > #
2009 Nov 28
1
R function that duplicates Octave's poly function?
By any chance is anyone aware of an R function that duplicates Octave's poly function? Here is a description of Octave's poly function: Function File: poly (A) If A is a square N-by-N matrix, `poly (A)' is the row vector of the coefficients of `det (z * eye (N) - a)', the characteristic polynomial of A. As an example we can use this to find the eigenvalues