cm_range2long: Transform Codes to Start-End Durations

Description Usage Arguments Value References See Also Examples

Description

Transforms the range coding structure(s) from cm_range.temp (in list format) into a data frame of start and end durations in long format.

Usage

1
2
  cm_range2long(..., v.name = "variable", list.var = TRUE,
    debug = TRUE)

Arguments

...

list object(s) in the form generated by cm_time.temp.

v.name

sn optional name for the column created for the list.var argument.

list.var

logical. If TRUE creates a column for the data frame created by each time.list passed to cm_t2l.

debug

logical. If TRUE debugging mode is on. cm_time2long will return possible errors in time span inputs.

Value

Generates a data frame of start and end times for each code.

References

Miles, M. B. & Huberman, A. M. (1994). An expanded sourcebook: Qualitative data analysis. 2nd ed. Thousand Oaks, CA: SAGE Publications.

See Also

cm_df2long, cm_time.temp, cm_df.transcript

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
foo <- list(
    AA = qcv(terms="1"),
    BB = qcv(terms="1:2, 3:10, 19"),
    CC = qcv(terms="1:9, 100:150")
)

foo2  <- list(
    AA = qcv(terms="40"),
    BB = qcv(terms="50:90"),
    CC = qcv(terms="60:90, 100:120, 150"),
    DD = qcv(terms="")
)

(dat <- cm_range2long(foo, foo2, v.name = "time"))
gantt_wrap(dat, "code", "time")

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.