split_airnow_data: split_airnow_data

View source: R/monitors.R

split_airnow_dataR Documentation

split_airnow_data

Description

Create a training and test data set - test dataset is a fraction of the samples, chosen randomly for each day.

Usage

split_airnow_data(df, test_fraction = 0.3, seed = 1977)

Arguments

df

A SpatialPointsDataFrame from recast_monitors. Can include AirNow and/or AIRSIS data.

test_fraction

The fraction of data to withold as the test data set. Default is 0.3.

seed

numeric A starting randomization seed. Default is 1977.

Value

A list with two SpatialPointsDataFrames, test and train

Examples

mon_split <- split_airnow_data(an_ws, test_fraction = 0.3)

raffscallion/rapidfire documentation built on June 1, 2025, 2:04 p.m.