split_data: Split data frames according to a ratio into training and test...

Description Usage Arguments Value

View source: R/merged_list_functions.r

Description

This function applies a split to the data frames contained in the input list. It first groups the data frames based on their number of rows. It then iterates over the data frames in each group and the provided split ratios to separate each data frame into a train and a test set. A nested list is returned having the names as first level and the respective split data sets on second level.

Usage

1
split_data(merged_list, split_ratios)

Arguments

merged_list

a list of data frames

split_ratios

a numerical vector of ratios from 0 to 1 indicating the training fraction after the split, e.g. 'c(0.75, 0.8)' for two rounds of splits with resulting training sets of 75 and 80 percent of the total samples

Value

A named nested list, containing both parts of the splitted data frame. The name is updated to reflect the split ratio


RJ333/phyloseq2ML documentation built on June 2, 2020, 9:25 p.m.