I tried. yours works too. thanks a bounch!! Man
--
View this message in context:
http://r.789695.n4.nabble.com/Sampling-problem-tp3043804p3049013.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https:
I figured it out myself.
Again, Michael and Petr, many thanks to both of you!!! :)
--
View this message in context:
http://r.789695.n4.nabble.com/Sampling-problem-tp3043804p3046161.html
Sent from the R help mailing list archive at Nabble.com.
__
R-h
Hi:
Try this:
# Function to generate one sample from the data frame
sampler <- function(df) {
s1 <- sample(nrow(df), 1, replace = FALSE)
s2 <- sample(setdiff(1:nrow(df), s1), 2, replace = FALSE)
list(sample1 = df[s1, grep('^C', names(df))],
sample2 = df[s2, grep('^W', nam
Fabulicious! It worked!!!
One more question, in the following data frame as posted above:
SubIDCSE1 CSE2 CSE3 CSE4 WSE1 WSE2 WSE3 WSE4
1 6 5 6 2 6 22 4
2 6 4 7 2 6 6
Hi
Here is one way (If I understood what you did ask).
test<-read.table("clipboard", header=T)
> test
SubID CSE1 CSE2 CSE3 CSE4 WSE1 WSE2 WSE3 WSE4
1 165626224
2 264726623
3 355555545
4
5 matches
Mail list logo