Split naturalistic data into the original files
nds_split_data.Rd
Arguments
- data
A data.frame or tibble with naturalistic data
- driver
A column with the names of the drivers.
Details
This function splits the naturalistic data into the original separation of the NDS-BR sample.
nds_split_data
takes the naturalistic data imported by
nds_load_data and splits into four tibbles, matching the original
separation of drivers provided by the sample of NDS-BR. The function uses
the column containing driver names to properly split the data.
Examples
path <- system.file("extdata", package = "ndsbr")
df <- nds_load_data("driver", path)
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
df_split <- nds_split_data(df)