search for: probvec

Displaying 1 result from an estimated 1 matches for "probvec".

Did you mean: problem
2011 Aug 24
4
Column of probabilities
Hi all, I have a vector xm say: xm = c(1,2,3,4,5,5,5,6,6) I want to return a vector with the corresponding probabilities based on the amount of times the numbers occurred. For example, I should get the following vector for xm: prob.xm = c(1/9, 1/9, 1/9, 1/9, 3/9, 3/9, 3/9, 2/9, 2/9) Any help greatly appreciated. -- Thanks, Jim. [[alternative HTML version deleted]]