Dear list,
I am trying to find the way to add columns to a table
(or a matrix) after a loop. The result of this loop is
an array and I would like to get all the results in a
single table once the loop is finish. I have
reproduced a simplified example below:
a- 1
b - matrix()
while (a = 4) {
+
,] 1.62361191 NA NA NA
[9,] 0.02644486 NA NA NA
[10,] 0.32406407 NA NA NA
I do not know what else to try...
best wishes
a
- Message d'origine
De : Uwe Ligges [EMAIL PROTECTED]
À : Albert Picado [EMAIL PROTECTED]
Cc : r-help@stat.math.ethz.ch
Envoyé le : Samedi, 12 Août
Dear List members
I am trying to find a way to generate a random point in a circle centred in a
geographical location.
So far I have used the following formula (see code below):
random_x = original_x + radius*cos(angle)
random_y = original_y + radius*sin(angle)
where radius is a random number