Displaying 1 result from an estimated 1 matches for "tableofgivenlevels".
2011 Jun 14
1
"non-numeric argument to binary operator"
Hello,
For reasons unclear to me I am getting above error message when I change the
value of b in the following code:
rm(list=ls())
library("Hmisc")
set.seed(4) #seems to have an effect on t(apply
b=10
pop.props = c(0.6,0.2,0.2)
x=matrix(pop.props,nrow=nn,ncol=length(pop.props), byrow=T)
print(x)
habs = rMultinom((x),b)
print(habs)