rid.from.coupons: Determines the recruiter.id from recruitment coupon...

View source: R/rds.data.frame-utils.R

rid.from.couponsR Documentation

Determines the recruiter.id from recruitment coupon information

Description

Determines the recruiter.id from recruitment coupon information

Usage

rid.from.coupons(
  data,
  subject.coupon = NULL,
  coupon.variables,
  subject.id = NULL,
  seed.id = "seed"
)

Arguments

data

a data.frame

subject.coupon

The variable representing the coupon returned by subject

coupon.variables

The variable representing the coupon ids given to the subject

subject.id

The variable representing the subject's id

seed.id

The recruiter.id to assign to seed subjects.

Examples

fpath <- system.file("extdata", "nyjazz.csv", package="RDS")
dat <- read.csv(fpath)
dat$recruiter.id <- rid.from.coupons(dat,"own.coupon",
                      paste0("coupon.",1:7),"id")

#create and rds.data.frame
rds <- as.rds.data.frame(dat,network.size="network.size")

RDS documentation built on Aug. 20, 2023, 9:06 a.m.