dataFlightCheck: Check data formating for the NicePlots package

View source: R/np_data_processing.R

dataFlightCheckR Documentation

Check data formating for the NicePlots package

Description

Formats and cleans data prior to setting up the plotting enviroment

Usage

dataFlightCheck(data, by, flipFacts, na.rm = FALSE)

Arguments

data

vector or dataframe; data to be plotted

by

factor or dataframe; factors to be used to format data

flipFacts

logical; If a dataframe is used for plotting data input, this will covert the data to a vector with the dataframe colums trasfered a factor in the second column of the by input.

na.rm

logical; Removes all data and factor rows were NA is presenst.

Details

This funciton makes sure the data input is a numeric vector or a data frame of numeric vectors. It will also check to make sure by is a factor or a dataframe of factors. If requested, it will also remove missing data and rearrage numeric dataframe inputs.

Value

A named list with d=data and b=by.

Examples

todo<-1


ZachHunter/NicePlots.R documentation built on Sept. 23, 2023, 4:04 a.m.