Description Usage Arguments Value Examples
This function allows you number your observations by participant (P), by day (D) or by participant and day (PD) using a unix (numeric) timestamp
1 |
ID |
name of ID variable |
TS |
name unix (numeric) timestamp (if you have a date-time object, try converting it with as.numeric(as.POSIXct())) |
BY |
participant (P), by day (D), or by participant and day (PD). P will create a column of just 1 through n responses for each participant. D will create a day-level sequential value. PD will create an observation within each day. This might be most useful by first using the BY=D option, which will give you day number to use in tandem with observation #. |
A column in your dataframe (with person-centered data)
1 2 3 | ## Not run: data$ObsNumb<-ObsNumbs(data$ID,data$TS, BY="P")
## Not run: data$DayNumb<-ObsNumbs(data$ID,data$TS,BY="D")
## Not run: data$ObsNumb_D<-ObsNumbs(data$ID,data$TS,BY="PD")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.