- data
The wide data frame.
- prefix
What character(s) go before the period indicator? If none,
set this argument to NULL.
- suffix
What character(s) go after the period indicator? If none,
set this argument to NULL.
- begin
What is the label for the first period? Could be 1
, "A"
,
or anything that can be sequenced.
- end
What is the label for the final period? Could be 2
, "B"
,
or anything that can be sequenced and lies further along the sequence
than the begin
argument.
- id
The name of the ID variable as a string. If there is no ID
variable, then this will be the name of the newly-created ID variable.
- wave
This will be the name of the newly-created wave variable.
- periods
If you period indicator does not lie in a sequence or is
not understood by the function, then you can supply them as a vector
instead. For instance, you could give c("one","three","five")
if
your variables are labeled var_one
, var_three
, and var_five
.
- label_location
Where does the period label go on the variable?
If the variables are labeled like var_1
, var_2
, etc., then it is
"end"
. If the labels are more like A_var
, B_var
, and so on, then
it is "beginning"
.
- as_panel_data
Should the return object be a panel_data()
object?
Default is TRUE.
- match
The regex that will match the part of the variable names other
than the wave indicator. By default it will match any character any
amount of times. Sometimes you might know that the variable names should
start with a digit, for instance, and you might use "\\d.*"
instead.
- use.regex
Should the begin
and end
arguments be treated as
regular expressions? Default is FALSE.
- check.varying
Should the function check to make sure that every
variable in the wide data with a wave indicator is actually time-varying?
Default is TRUE, meaning that a constant like "race_W1" only measured in
wave 1 will be defined in each wave in the long data. With very large
datasets, however, sometimes setting this to FALSE can save memory.