indexing
indexing
## S3 method for class 'rds.data.frame' x[i, j, ..., drop, warn = TRUE]
x |
object |
i |
indices |
j |
indices |
... |
unused |
drop |
drop |
warn |
Warn if any new seeds are created |
Subsetting of RDS recruitment trees does not always yield a full RDS tree. In this case, subjects whose recruiter is no longer in the dataset are considered seeds. is issued if the 'warn' parameter is TRUE. dat <- data.frame(id=c(1,2,3,4,5), recruiter.id=c(2,-1,2,-1,4), network.size.variable=c(4,8,8,2,3)) r <- as.rds.data.frame(dat) r[1:3,] # A valid pruning of the RDS tree. r[c(1,5),warn=FALSE] # recruiter.id of last row set to -1 (i.e. a seed) to maintain validity of tree
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.