Hi all

I define a function with two methods, one for numeric or integer. 
Sometime, I need the numeric method to be applied on integer. So I try 
to change the class of the integer but it does not work... Does someone 
know why ?

>  x<-1:3
>  class(x)
[1] "integer"
>  class(x)<- "numeric"
>  class(x)
[1] "integer"

Thanks

Christophe

______________________________________________
R-help@stat.math.ethz.ch 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