[R] Entering a table

Noia Raindrops noia.raindrops at gmail.com
Tue Aug 21 15:03:06 CEST 2012


Try this:

table(nDeaths = rep(0:4, c(109, 65, 22, 3, 1)))
## or
as.table(array(c(109L, 65L, 22L, 3L, 1L), dimnames = list(nDeaths = 0:4)))

-- 
Noia Raindrops
noia.raindrops at gmail.com




More information about the R-help mailing list