fx_sample: Break up Data into Train and Test

View source: R/fx_sample.R

fx_sampleR Documentation

Break up Data into Train and Test

Description

Break up single data frame into train and test datasets.

Usage

fx_sample(df0, partition)

Arguments

df0

data frame including all observations (data frame).

partition

list object containing train and test group assignment.

Value

A list of length three,containing subsets of original data frame and model parameters

  • df.train: data frame containing only rows assigned to train set

  • df.test: data frame containing only rows assigned to test set

  • parameters: list of relevant specified parameters

    • "sample.type": cross-validation sampling procedure

    • "train.rows": row indices assigned to train set

    • "test.rows": row indices assigned to test set

    • "data.frame": data frame specified (CURRENTLY NOT CORRECTLY SPECIFIED)

    • "nresample": number of resamples

    • "balance.col": column to use for balancing groups


fishpm/nruPredict documentation built on July 12, 2022, 3:22 p.m.