combine: Combine trials by treatment

Description Usage Arguments Value Author(s) Examples

View source: R/combinetrials.R

Description

determine if a list of trials can be combined through ANOVA based on a common treatment. A critical p-value can be specified to determine if trials can be combined. If the ANOVA is insignificant, retunrs a list of all combined treatments under a unique name under column 'TRIAL #'. Otherwise, returns false, indicating the trials cannot be combined.

Usage

1
combine(datafile, trt, p_crit = 0.05)

Arguments

datafile

A list containing 'EVALUATION MEAN' dataframe, which contains 'SUMMARY TRT#', 'TRIAL #', and 'DATA' columns. The list and containing dataframes are required to formatted as the output for the function 'readallsheets'.

trt

A numeric value corresponding to at least one entry within the 'SUMMARY TRT#' within 'EVALUATION MEAN' dataframe provided in datafile list. Respresents the common treatment combining all trials containing this treatment.

p_crit

A numeric value 1>p_crit>0, denoting the p-value which delimits a significant and non-significant ANOVA.

Value

Should the conducted ANOVA be significant, then a boolean 'FALSE' is returned. Should the conducted ANOVA be insignificant, then a dataframe containing the combined trials under a common, but unique trial name.

Author(s)

Brent Murphy

Examples

1
2
3
4
5
path1<-system.file("extdata", 
                   "YIELDALL_MTA_FLATFILE.xls", 
                    package = "fieldproanalysis")
mysheets<-readallsheets(path1,"example.csv")
combine(mysheets,515)

brentpm2/FIELD_PRO_ANALYSIS documentation built on May 7, 2019, 3:20 p.m.