Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071003/4cebbf6f/attachment.pl
On Wed, 2007-10-03 at 21:31 +0000, lamack lamack wrote:> Dear all, there is an R function do a frequency table considering a weight variable? > > M A 23 > M B 34 > F A 23 > F B 45 > > I would like a table like this > > A B > M 23 34 > F 23 45See ?xtabs For example, given a data frame 'DF':> DFV1 V2 V3 1 M A 23 2 M B 34 3 F A 23 4 F B 45> xtabs(V3 ~ V1 + V2, DF)V2 V1 A B F 23 45 M 23 34 HTH, Marc Schwartz