On 2011-03-29 19:12, Mark Ebbert wrote:
Hi,

I apologize if the solution is right in front of me, but I can't find anything on 
how to convert a class of 'noquote' to 'matrix'. I've tried as.matrix and I've 
tried coercing it by 'class(x)<-matrix', but of course that didn't work. I've 
been using the function 'symnum' which returns an object of class 'noquote'.

Here is an example from the 'symnum' help page:
pval<- rev(sort(c(outer(1:6, 10^-(1:3)))))
      symp<- symnum(pval, corr=FALSE,
                     cutpoints = c(0,  .001,.01,.05, .1, 1),
                     symbols = c("***","**","*","."," "))

One way would be to unclass the object first:

 as.matrix(unclass(symp))

Peter Ehlers


Thanks!
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to