[R] a quick question about rbinom

2012-01-04 Thread lynn.tsai
Hello, I have the following code using rbinom, but I don't understand what *+1* means in the code. Could someone help? Thanks so much, X1-c(A,B)[rbinom(n,1,0.6)+1] X2-c(C,D)[rbinom(n,1,0.1)+1] -- View this message in context:

Re: [R] a quick question about rbinom

2012-01-04 Thread lynn.tsai
Hi, thank you all for replying. First, it's not a homework. I'm learning R and the CFA (configural frequency analysis). I am trying to understand this part of the code so that I can modify it and run a simulation for power analysis of CFA. Thanks again. -- View this message in context: