8 June 2009 10:17
To: Economics Guy
Cc: r-help@r-project.org
Subject: Re: [R] Running a function through a vector with the scalars as
arguments
Try this:
sapply(theProbs, rbinom, size = 1, n = 1)
You are using probsFoo in lapply, I don't know what is this.
On Wed, Jun 17, 2009
Try this:
sapply(theProbs, rbinom, size = 1, n = 1)
You are using probsFoo in lapply, I don't know what is this.
On Wed, Jun 17, 2009 at 9:09 PM, Economics Guy wrote:
> I have a vector of probabilities that I would like to feed to rbinom()
> and have it return a 1 or 0 for each element. I have
2 matches
Mail list logo