day_dummies.Rd
This function returns either NULL
(if measurements_per_day
is 0) or a matrix of weekday dummy variables specified number of rows and measurements per day. In the latter case, we return a matrix of six columns.
day_dummies(number_of_rows, measurements_per_day)
number_of_rows | the number of rows in the input data set. |
---|---|
measurements_per_day | the number of measurements per day in the input data set. |
Either NULL
or a matrix with number_of_rows
rows and 6
columns.
#> day_1 day_2 day_3 day_4 day_5 day_6 #> [1,] 1 0 0 0 0 0 #> [2,] 1 0 0 0 0 0 #> [3,] 0 1 0 0 0 0 #> [4,] 0 1 0 0 0 0 #> [5,] 0 0 1 0 0 0 #> [6,] 0 0 1 0 0 0 #> [7,] 0 0 0 1 0 0 #> [8,] 0 0 0 1 0 0 #> [9,] 0 0 0 0 1 0 #> [10,] 0 0 0 0 1 0 #> [11,] 0 0 0 0 0 1 #> [12,] 0 0 0 0 0 1 #> [13,] 0 0 0 0 0 0 #> [14,] 0 0 0 0 0 0 #> [15,] 1 0 0 0 0 0 #> [16,] 1 0 0 0 0 0