Skip to content
Back to formatted view

Raw Message

Message-ID: <457F1509.8080009@freesurf.Fr>
Date: 2006-12-12T20:46:01Z
From: Jacques Ropers
Subject: ifelse question

What is puzzling me is that rnorm(1) is only evaluated *twice*, one time 
for each branch, with only 2 different random deviates, instead of 
giving ten different random deviates. y1 has indeed 10 values but with 
only 2 different ones.
I would like to have rnorm be evaluated for each row and collect ten 
*different* random deviates.

y1
 [1] 0.4087172 0.7707796 0.4087172 0.4087172 0.7707796 0.4087172 0.4087172
 [8] 0.7707796 0.7707796 0.4087172


Thanks.

Jacques.