Displaying 1 result from an estimated 1 matches for "tp2308840p2308844".
Did you mean:
tp2308840p2308840
2010 Jul 31
2
vector creation
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 just call vect<-rep( func(), N) - I guess that there
also exists a one-liner to do that