data(msats.g)
# lookup table of all samples by number
by.num <- idRows(msats.g)
head(by.num)
# lookup table of all samples by name
by.name <- idRows(msats.g, as.name = TRUE)
head(by.name)
# lookup table of selected ids
ran.ids <- sample(indNames(msats.g), 5)
ran.by.num <- idRows(msats.g, ids = ran.ids, as.name = TRUE)
ran.ids
Run the code above in your browser using DataLab