[R] boot&table

Katalin Csillery csillery at selway.umt.edu
Thu Nov 7 23:30:10 CET 2002


I want to bootstarp a sample, and I need table() for each sample taken,
like if R=100, I need all 100 table(). It seems to mee that boot() works
anly if you assing statistics, that gives you back one number, like
mean. Although the ?boot/statistics says that it can be a vector
containing statistics. table() gives an array, so it might work. Does
anybody have an idea how? I konw it can be done by a loop and
sample() function, but it not as fast as boot().
Another question, how can you get frequencies for sample values, like what
table() does, but with reference to both the value itself and the
corresponding frequencies. I would like to have those values in a matrix
with 2 col. It is very troublesome to make it form what table() returns.

Thanks for your help!


Katalin Csillery
Division of Biological Sciences
University of Montana, Missoula MT 59801
Phone: 406 243 6106, E-mail: csillery at selway.umt.edu

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list