search for: some_sd

Displaying 1 result from an estimated 1 matches for "some_sd".

Did you mean: some_id
2006 Aug 04
3
Building a random walk vector
I'm studying R in my free time. I want to build a vector where each element is equal to the element before it in the sequence plus some random tweak. In python, I would write: vec = [100] * 50 # make a 50-element list with each element set to 100 from random import randint for i, v in enumerate(vec): if i is not 0: # if we're not on the first element vec[i] = vec[i-1] +