Learn R Programming

migrbc (version 2.0.9)

pre_process: A function to convert a large data into a number of sub groups

Description

This function provides a mechanism to divide large data into small chunks.

Usage

pre_process(data, init_res_status_data = NULL, n_groups = 1)

Arguments

data

A dataframe object.

init_res_status_data

The raw data of the initial residence status in the format of data frame.

n_groups

The number of groups required to be returned.

Value

A list object contains reformatted raw data.

Examples

Run this code
# NOT RUN {
## to suppresse log messages to the console
migrbc::initialize_logger(log_level = 1)

number_of_people = 10
person_data <- migrbc::setup_random_test_data(number_of_people, 
                                              initial_date = '2001-01-01', 
                                              numJourneys = 5,
                                              min = 0, 
                                              max = 10)
crossings <- migrbc::pre_process(person_data, n_groups = 10)
crossings

# }

Run the code above in your browser using DataLab