Hello,
What about
test <- c(rep(c("A","C","G","T"), 20),"C")
table(test)
I am not sure that is an apt representation of the data and problem
you are trying to solve. It also occurred to me that each character
may not be its own element in the vector. If that is so, you would
need to do something a little differently.
Let us know.
Josh
On Thu, Apr 22, 2010 at 10:36 AM, Zoppoli, Gabriele (NIH/NCI) [G]
<[email protected]> wrote:
> 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: [email protected]
> ______________________________________________
> [email protected] 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.
>
--
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/
______________________________________________
[email protected] 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.