[R] simple question
Lee.Adams at luminant.com
Lee.Adams at luminant.com
Thu Apr 22 20:15:56 CEST 2010
Gabriele -
How about this:
> data<-c("A","A","A","B","B","C","D")
> data
[1] "A" "A" "A" "B" "B" "C" "D"
> table(data)
data
A B C D
3 2 1 1
Thanks,
Lee
". . . people who focus only on 'what is' will create more of 'what is.'
People who focus mostly on 'what could be' will begin to create 'what
could be.'" ~ Laura Beth Jones
Lee P. Adams | Fuel & Emissions Strategy | Luminant Energy |
lee.adams at luminant.com | 214.875.8737 Office | 214.701.0687 Mobile
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Zoppoli, Gabriele (NIH/NCI) [G]
Sent: Thursday, April 22, 2010 12:37 PM
To: r-help at r-project.org
Subject: [R] simple question
Hi
how can I find, in a vector of characters, which is the most frequent
one?
Thanks
Gabriele Zoppoli, MD
Ph.D. Fellow, Experimental and Clinical Oncology and Hematology,
University of Genova, Genova, Italy
Guest Researcher, LMP, NCI, NIH, Bethesda MD
Work: 301-451-8575
Mobile: 301-204-5642
Email: zoppolig at mail.nih.gov
______________________________________________
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.
Confidentiality Notice: This email message, including an...{{dropped:10}}
More information about the R-help
mailing list