Displaying 2 results from an estimated 2 matches for "subgroup2".
Did you mean:
subgroup
2010 Jan 10
0
ordering of additional columns in forest plot in meta package
...r ordering of this data is confirmed by the color coding
(black and red in the example) of the subgroup label. Also the
"studlab","event" and "n" are all ordered correctly.
The probIem now is that I cannot get the added columns
("rnd.subgroup1" and "rnd.subgroup2") to follow this same proper
ordering.
library(meta)
# dummy data
nr.studies <- 20
rnd.subgroup1 <- round(rnorm(nr.studies,1.5,.1),0) # random 1s and 2s
rnd.subgroup2 <- c(letters[1:nr.studies]) # ordered unique letters
lbls <- c(letters[1:nr.studies]) # letters as surroga...
2002 Oct 28
2
subsetting character vector into groups of numerics
...plicated ones.
I have a number of character vectors that look something like this:
"12 78 23 9 76 43 2 15 41 81 92 5(92 12) (81 78 5 76 9 41) (23 2 15 43)"
I wish to get it into a list of numerical vectors like this:
$Group
[1] 12 78 23 9 76 43 2 15 41 81 92 5
$Subgroup1
[1] 92 12
$Subgroup2
[1] 81 78 5 76 9 41
$Subgroup3
[1] 23 2 15 43
I can't rely on the closing parenthesis as the last character in the
vector, though the subgroup could be clearly defined without it.
Numbers are obvious to the eye, but are not always separated from one
another consistently. Part of the reason f...