Description Usage Arguments Value References See Also Examples
Transforms the range coding structure(s) from cm_df.temp
(in list format) into a data frame of start and end durations in long format.
1 2 3 4 5 6 7 8 9 10 |
df.temp.obj |
A character vector of names of object(s) created by
|
v.name |
An optional name for the column created for the list.var argument. |
list.var |
logical. If |
code.vars |
A character vector of code variables. If |
no.code |
The value to assign to no code; default is |
add.start.end |
logical. If |
repeat.vars |
A character vector of repeated/stacked variables. If
|
rev.code |
logical. If |
Generates a data frame of start and end times for each code.
Miles, M. B. & Huberman, A. M. (1994). An expanded sourcebook: Qualitative data analysis. 2nd ed. Thousand Oaks, CA: SAGE Publications.
cm_time2long
,
cm_range2long
,
cm_df.temp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
codes <- qcv(dc, sf, wes, pol, rejk, lk, azx, mmm)
x1 <- cm_df.temp(DATA, "state", codes)
head(x1)
#empty code matrix
out1 <- cm_df2long(x1, code.vars = codes)
head(out1, 15)
#fill it randomly
x1[, 7:14] <- lapply(7:14, function(i) sample(0:1, nrow(x1), TRUE))
out2 <- cm_df2long(x1, code.vars = codes)
head(out2, 15)
plot(out2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.