Hello S-PLUS users,
Hoping you can help out on this one.
Say I have a list (grip) composed of 5 matrices (grip1, grip2, grip3,
grip4, grip5). Each matrix gives coordinates x and y (rows and columns)
which will later be used to fill in a larger matrix, z.grip. For my
algorithm, I would like to randomly sample 1 or more (n) of the matrices
from the list and return their coordinates as a single matrix or directly
assign a value to the z.grip matrix by the output of the randomly sampled
matrix of coordinates. Furthermore I would like to perform this operation
in 1 step, if possible.
I've tried embedding the sample command to extract list elements but I
just get another list with the sampled matrices. I am using S-PLUS 2000.
Thanks for any suggestions,
RC
|