Re: [R] Error in names(x) <- value: 'names' attribute must be the same length as the vector in gam function

2019-01-04 Thread William Dunlap via R-help
mgcv::s() does not appear to work with objects of class "Date". E.g., > d <- data.frame(date=seq(as.Date("2018-12-20"),len=10,by="week"), response=log2(1:10)%%1) > model <- gam(data=d, response ~ s(date)) Error in names(dat) <- object$term : 'names' attribute [1] must be the same length as the

[R] Error in names(data)[ix] : only 0's may be mixed with negative subscripts

2013-05-29 Thread rennerie
I am getting the error "Error in names(data)[ix] : only 0's may be mixed with negative subscripts" and cannot quite figure out how to resolve this. Any ideas? > attempt <- read.csv("attempt.csv") > str(attempt) 'data.frame': 9424 obs. of 9 variables: $ cgPlaId : int 647 647 647 647 647 647

Re: [R] Error in names(x) <- value: 'names' attribute must be the same length as the vector

2012-05-14 Thread David Winsemius
On May 14, 2012, at 2:35 PM, Priya Bhatt wrote: Dear R-helpers, I am stuck on an error in R: When I run my code (below), I get this error back: Error in names(x) <- value : 'names' attribute must be the same length as the vector Then when I use traceback(), R gives me back this in retu

Re: [R] Error in names(x) <- value: 'names' attribute must be the same length as the vector

2012-05-14 Thread Tyler Rinker
te: Mon, 14 May 2012 11:35:07 -0700 > From: bhatt...@gmail.com > To: r-help@r-project.org > Subject: [R] Error in names(x) <- value: 'names' attribute must be the same > length as the vector > > Dear R-helpers, > > I am stuck on an error in R: When I run my cod

[R] Error in names(x) <- value: 'names' attribute must be the same length as the vector

2012-05-14 Thread Priya Bhatt
Dear R-helpers, I am stuck on an error in R: When I run my code (below), I get this error back: Error in names(x) <- value : 'names' attribute must be the same length as the vector Then when I use traceback(), R gives me back this in return: `colnames<-`(`*tmp*`, value = c(""Item", "Color"

Re: [R] error in names

2009-08-11 Thread Gavin Simpson
On Tue, 2009-08-11 at 17:49 +, Inchallah Yarab wrote: > Hi, > what is meaning this errors !!! > Error in names(o.pr)[p.ok] <- names(qs) : > incompatible types (from NULL to character) in subassignment type fix I can replicate this error by 'qs' not having names. what does names(qs) show?

[R] error in names

2009-08-11 Thread Inchallah Yarab
Hi, what is meaning this errors !!! Error in names(o.pr)[p.ok] <- names(qs) :   incompatible types (from NULL to character) in subassignment type fix In addition: Warning message: In Ops.factor(from, (0:(length.out - 1)) * by) :   + not meaningful for factors thank you very much