readallsheets: Readallsheets-xls file

Description Usage Arguments Value Author(s) Examples

View source: R/readinfunction.R

Description

This function takes in a user given xls file that was outputted by MTA for FieldPro and reads in all three sheets. Several columns not used for data analysis are removed. The function will also give errors if there are negative values for weather data and response variable data. A CSV file containing a the saved columns from the EVALUATION MEANS sheet of the original document will be saved to a user defined file name. If no file name is given, the saved file will be named "Evaluationmean.csv".

Usage

1
readallsheets(filename, new_csv_name = "Evaluationmean.csv")

Arguments

filename

An XLS file ,outputted from MTA for FieldPro, that is inputted by the user.

new_csv_name

The name of the new file that will be created.

Value

A CSV file containing data from the EVALUATION MEAN sheet of the inputted MTA xls file.

A list of three dataframes built from the original inputted MTA file:

TREATMENT

Dataframe containing all columns from the TREATMENT sheet of the original MTA file except for the "OPTIONAL TRT INFO" column.

SETTINGS

Dataframe containing all columns from the SETTINGS sheet of the original MTA file.

EVALUATION MEANS

Dataframe containining columns useful for data analysis and identification from the EVALUATION MEAN sheet of the original MTA file.

Author(s)

Christopher Landau

Examples

1
2
3
4
path1<-system.file("extdata", "YIELDALL_MTA_FLATFILE.xls", package = "fieldproanalysis")
mysheets<-readallsheets(path1,"example.csv")
## Will give a warning that the rate values may be abnormal.  
## This is due to some of the example rates in YIELDALL_MTA_FLATFILE.xls being large.

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