On Jul 31, 2010, at 10:21 AM, Berend Hasselman wrote:
On 31-07-2010, at 16:12, alekk [via R] wrote:
sorry for being unclear:
my function func() is actually more complicated than that, and uses
random numbers to generate its result. If I run something like
vect = rep(func(), N)
I will
sorry for being unclear:
my function func() is actually more complicated than that, and uses random
numbers to generate its result. If I run something like
vect = rep(func(), N)
I will get something like (x,x,x, ... ,x).
What is the right way to do that ?
Thanks!
--
View this message in
dear all,
consider a simple function like
func = function(){ return(runif()) }
and say that you would like to create a vector of size N, each entry being a
call to this function "func". What is the equivalent of the python code
vect = [ func() for i in range(N)]
Indeed, you cannot jus
On 31-07-2010, at 16:12, alekk [via R] wrote:
> sorry for being unclear:
> my function func() is actually more complicated than that, and uses random
> numbers to generate its result. If I run something like
> vect = rep(func(), N)
> I will get something like (x,x,x, ... ,x).
>
> Wha
alekk wrote:
>
> consider a simple function like
> func = function(){ return(runif()) }
> and say that you would like to create a vector of size N, each entry being
> a call to this function "func". What is the equivalent of the python code
> vect = [ func() for i in range(N)]
> Inde
5 matches
Mail list logo