[R] Mode Vs Class

From: Shubha Vishwanath Karanth <shubhak_at_ambaresearch.com>
Date: Tue, 08 Apr 2008 17:49:52 +0530


Hi R,  

Just came across the 'mode' of an object. What is the basic difference between ?class and ?mode...For example:  

d=data.frame(a=c(1,2),b=c(5,6))

class(d)

[1] "data.frame"

mode(d)

[1] "list"
 

But,  

c=c(2,3,5,6,7)

class(c)

[1] "numeric"

mode(c)

[1] "numeric"
 

Could anyone help me out...  

Thanks,

shubha  

This e-mail may contain confidential and/or privileged i...{{dropped:13}}



R-help_at_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. Received on Tue 08 Apr 2008 - 12:28:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Apr 2008 - 12:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive