[R] r function definition

2012-12-03 Thread qq
I am a very new R user. I am trying to write functons and debug functions. One problem for me is that I need to alwasy copy the whole function body and resubmit to R console every time I changed even one line of the function. Because I have long algorithm function, copying and pasting is very tedio

[R] how to simulate from a conditional distribution

2008-01-24 Thread qq ww
Dear all, I am new to R so please bear with me for the questions. If I have x ~N(0, var1), and I know Y|X ~N(0, var2). X and Y are both vectors of equal length. How do I simulate samples for Y? [[alternative HTML version deleted]] __ R-help@r-p