Re: [R] String frequencies in rows

From: Ben Bolker <bolker_at_ufl.edu>
Date: Thu 27 Jul 2006 - 00:59:35 EST

Mario Falchi <mariofalchi <at> yahoo.com> writes:

> I’m trying to evaluate the frequency of different strings in each row of a
data.frame :
> INPUT:
> ID G1 G2 G3 G4 … GN
> 1 AA BB AB AB …

  Something like

z <- data[,-1]
table(z,row(z))

  ?

  Ben Bolker



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. Received on Thu Jul 27 01:22:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 27 Jul 2006 - 02:16:40 EST.

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