Re: [R] argument to 'which' is not logical

2017-03-23 Thread S Ellison
> I'm trying to run the code: inds<-which(c != 0 ), but it gave me error: Error > in > base::which(x, arr.ind, useNames, ...) :   argument to 'which' is not logical Your coefficients are not a numeric vector. You'll have to sort that out by extracting or testing the individual values. A look at

Re: [R] argument to 'which' is not logical

2017-03-22 Thread Jeff Newmiller
The `c` function is extremely common. You CAN redefine this object as a numeric variable if you want but I strongly recommend against it. I don't recognize the function you are using to create cvfits, but it looks like the coef method for that object is not returning a numeric vector, so your