[R] Extract data of special character

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Thu Mar 14 22:51:53 CET 2019


Hello,

Or more simple,

xtabs( ~ ATTRIBUTE + TRAIT, dd)


Hope this helps,

Rui Barradas

Às 19:27 de 14/03/2019, Ivan Krylov escreveu:
> On Fri, 15 Mar 2019 03:06:28 +0800
> roslinazairimah zakaria <roslinaump using gmail.com> wrote:
> 
>> how many of ATTRIBUTE related to TRAITS.
> 
> The table() function can be used to count occurrences of each
> combination of factor levels. Does extracting the two columns by
> dd[,c('ATTRIBUTE','TRAIT')] and passing the result to table() help?
>



More information about the R-help mailing list