- 1. [S] sampling from a vector subset (score: 1)
- Author: "Valerie Zartarian" <VZARTARIAN@usgs.gov>
- Date: Tue, 20 Apr 1999 17:55:54 -0400
- I have a vector of the following form: temp_c("R","N","N","R","M","M","R","R","M","R","R","N","R","R","N") I want to replace a random sample of 3 of the "R"s with a "Z". I would greatly appreciate an
- /archives/html/s-news/1999-04/msg00181.html (7,326 bytes)
- 2. Re: [S] sampling from a vector subset (score: 1)
- Author: John Wallace <jrw@fish.washington.edu>
- Date: Tue, 20 Apr 1999 17:19:51 -0700 (PDT)
- temp_c("R","N","N","R","M","M","R","R","M","R","R","N","R","R","N") temp.r_seq(along=temp)[temp=="R"] temp.z_temp temp.z[sample(temp.r, 3)]_"Z" temp.z temp # To compare greatly appreciate any insight
- /archives/html/s-news/1999-04/msg00184.html (9,750 bytes)
- 3. [S] sampling from a vector subset (score: 1)
- Author: "Valerie Zartarian" <VZARTARIAN@usgs.gov>
- Date: Wed, 21 Apr 1999 10:32:18 -0400
- My sincere thanks to each of you that took the time to answer my question from yesterday. I received a number of different solutions and have attached them below FYI. I am always impressed with the g
- /archives/html/s-news/1999-04/msg00192.html (13,096 bytes)
This search system is powered by
Namazu