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
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
I'd throw a browser() in at that point and see what colnames(newdf.int) gives
you. If you have less columns than names this is likely the reason for the
error.
You can get the same error with:
colnames(mtcars) <- LETTERS
Cheers,Tyler
> Date: Mon, 14 M
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?
4 matches
Mail list logo