rid.from.coupons {RDS}R 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")

[Package RDS version 0.9-9 Index]