s-news
[Top] [All Lists]

sampling matrices from a list

To: <s-news@lists.biostat.wustl.edu>
Subject: sampling matrices from a list
From: Robert Anthony Canales <rcanales@Stanford.EDU>
Date: Mon, 30 Jul 2001 19:19:26 -0700 (PDT)
In-reply-to: <005001c1192c$207ad1e0$3e1a7680@HDFS08>
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


<Prev in Thread] Current Thread [Next in Thread>
  • echo, Frank Lawrence
    • echo, Frank Lawrence
      • sampling matrices from a list, Robert Anthony Canales <=