On Jul 1, 2009, at 9:15 PM, Murray Cooper wrote:
Dear All,
I am new to R and slowly learning how to use the system.
The following code is an exercise I was trying.
The intent is to generate 10 random samples of size 5 from
a vector with integers 1:10 and 2 missing values. I then want
to genera
Dear Murray,
Here is one way: create a function that takes k sample()s from any vector
(e.g., x) and then calculates the number of NA values in it. Then replicate
the procedure as many times as you want.
# The function
foo <- function(x, k = 5){
xsample <- sample(x, k)
Dear All,
I am new to R and slowly learning how to use the system.
The following code is an exercise I was trying.
The intent is to generate 10 random samples of size 5 from
a vector with integers 1:10 and 2 missing values. I then want
to generate a matrix, for each sample which shows the freque
3 matches
Mail list logo