[R] Erros with RVM and LSSVM from kernlab library
dwinsemius at comcast.net
Wed Aug 19 23:50:00 CEST 2009
On Aug 19, 2009, at 3:17 PM, Steve Lianoglou wrote:
>> That makes sense, except that x is a data.frame with about 70
>> columns. So I don't see how it would convert to a list.
> Yeah ... not sure if that's what happening (R class relationships/
> testing is still a bit of a mystery to me), but see:
> R> df <- data.frame(a=1:10,b=1:10)
> R> is(df)
>  "data.frame" "list" "oldClass" "mpinput" "vector"
> R> is(df, 'list')
>  FALSE
I was a bit surprised by that construction but when I use my typical
approach (using is.vector, is.list, is.matrix, is.etc) , .... I get
results more in keeping with my expectations:
> df <- data.frame(a=1:10,b=1:10)
Reading the help page for the "is" function, I am not enlightened.
Seems that is.list(df) ought to return TRUE on the basis of the
description but the details are not particularly clearl to my reading
If you test thusly, it appears that "is" expects a complete listing of
> is(df, c("data.frame", "list", "oldClass", "vector") )
Guess I will stick with is.list for now.
> So, in short, I don't know if that's what's happening ... did it fix
> your problem, tho?
David Winsemius, MD
West Hartford, CT
More information about the R-help