Displaying 2 results from an estimated 2 matches for "samp5".
Did you mean:
samp
2004 Mar 09
2
maxima
Dear all,
suppose I have a bi-variate function f(x,y), I want to find the maxima. I
define x and y vector, and get matrix z=f(x,y). how can I get which (x0,y0)
makes z become the maxima?
I can do two loops to get the x0 and y0, but I think there may exist a
function to do this.
2010 May 23
2
Subsetting with a list of vectors
...0 vectors, each vector has 7 elements.
samp <- lapply(1:100, function(i) sample(LETTERS))
samp2 <- lapply(samp2, "[", 1:7)
How can I select the 26 plots from 'data' using 'samp'?
samp3 <- sample(LETTERS, 7)
samp4 <- subset(data, plot %in% samp3) # this works
samp5 <- subset(data, plot %in% samp2[[1]]) # this works as well, but
I used a for loop to get it to select 7 plots 100 times.
for (i in nrow(samp2)) {
samp6 <- subset(data, plot %in% samp2[[i]])
} # this doesn't work
Am I missing something, or is there a better solution?
Thanks.
Kang...