Hello, My question is assuming I have cut()'ed my sample and look at the table() of it, how can I compute probabilities for the bins? Do I have to parse table's names() to fetch bin endpoints to pass them to p[distr-name] functions? i really don't want to input arguments to PDF functions by hand (nor copy-and-paste way).
> x.fr <- table(cut(x,10)) > x.fr (0.0617,0.549] (0.549,1.04] (1.04,1.52] (1.52,2.01] (2.01,2.5] 16 28 26 18 6 (2.5,2.99] (2.99,3.48] (3.48,3.96] (3.96,4.45] (4.45,4.94] 3 2 0 0 1 > names(x.fr) [1] "(0.0617,0.549]" "(0.549,1.04]" "(1.04,1.52]" "(1.52,2.01]" [5] "(2.01,2.5]" "(2.5,2.99]" "(2.99,3.48]" "(3.48,3.96]" [9] "(3.96,4.45]" "(4.45,4.94]" -- Andrei Zorine ______________________________________________ R-help@r-project.org 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.