Learn R Programming

webtrackR (version 0.1.0)

add_panelist_data: Add panelist features to tracking data

Description

add_panelist_data() adds information about panelists (e.g., from a survey) to the tracking data.

Usage

add_panelist_data(wt, data, cols = NULL, join_on = "panelist_id")

Value

webtrack object with the same columns and the columns from data

specified in cols.

Arguments

wt

webtrack data object.

data

a data.table (or object that can be converted to data.table) which contains columns about panelists

cols

character vector of columns to add. If NULL, all columns are added. Defaults to NULL.

join_on

which columns to join on. Defaults to "panelist_id".

Examples

Run this code
if (FALSE) {
data("testdt_tracking")
data("testdt_survey_w")
wt <- as.wt_dt(testdt_tracking)
# add survey test data
add_panelist_data(wt, testdt_survey_w)
}

Run the code above in your browser using DataLab