amcat.add.parents: Add parents to a data frame of codes

Description Usage Arguments

View source: R/coding.r

Description

New columns are generated for each code, containing their roots / parents If columns is not specified, adds parents to each codebook column

Usage

1
amcat.add.parents(conn, codes, fields, columns = NULL, maxdepth = 1)

Arguments

conn

the connection object from amcat.connect

codes

a data frame of codes, e.g. from amcat.codingjob.results

fields

the coding field specifications, e.g. from amcat.codingjob.results

columns

a character vector containing the column names to add parents to

maxdepth

how many parent columns to add for each column, e.g. maxdepth=1 gives roots only


amcat/amcat-r documentation built on Dec. 26, 2021, 3:12 a.m.