indexing-methods: indexing

Description Usage Arguments Details

Description

indexing

Usage

1
2
## S3 method for class 'rds.data.frame'
x[i, j, ..., drop, warn = TRUE]

Arguments

x

object

i

indices

j

indices

...

unused

drop

drop

warn

Warn if any new seeds are created

Details

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


RDS documentation built on Sept. 16, 2017, 9:03 a.m.

Related to indexing-methods in RDS...