- 1. select vector names (score: 1)
- Author: "Heymans, MW" <mw.heymans@vumc.nl>
- Date: Thu, 11 May 2006 02:04:59 +0200
- I have this vector of names: [1] "FA" "WLV=2" "WLV=3" "WLV=4" "TS" "BAE" "BH" "WKZ" "RDQB" "gr=1" "gr=2" "gr=3" "gr=4" "gr=5" "gr=6" [16] "gr=7" and I want to change it to (same order, but without t
- /archives/html/s-news/2006-05/msg00041.html (6,990 bytes)
- 2. Re: select vector names (score: 1)
- Author: David L Lorenz <lorenz@usgs.gov>
- Date: Thu, 11 May 2006 07:24:47 -0500
- The hmisc library contains a function sedit() that will remove the =n part. Then use the unique() function to get the unique names in the vector. Like this: Vect <- c("FA", "WLV=2", "WLV=3", "WLV=4"
- /archives/html/s-news/2006-05/msg00043.html (9,770 bytes)
- 3. Re: select vector names (score: 1)
- Author: Tony Plate <tplate@blackmesacapital.com>
- Date: Thu, 11 May 2006 09:12:32 -0600
- Here's how you can do it using regular expression substitution: "RDQB", "gr=1", "gr=2", "gr=3") [1] "BAE" "BH" "FA" "RDQB" "TS" "WKZ" "WLV" "gr" (According to its documentation, gsub() in S-PLUS is i
- /archives/html/s-news/2006-05/msg00045.html (8,838 bytes)
This search system is powered by
Namazu