50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

simET (version 1.0.3)

create_modelDF: Create a csv file or a dataframe in R to store the model data

Description

#'@title Converting the every sheets in XLSX file to csv files #'@param xlsx_file the xlsx file path #'@export #'@importFrom utils write.csv #'@return No return value

Usage

create_modelDF(TreNum = 1, rowNum = 1)

Value

A dataframe and a csv file (if to_CSV_file==TRUE)

Arguments

TreNum

Number. Need to generate how many treatment columun

rowNum

Number. The number of row.

Details

convert_xlsx_to_csv<-function(xlsx_file) # library(readxl) # library(stringr) #sheetsname Sheetnames<-readxl::excel_sheets(xlsx_file) #xlsx2csv for (i in Sheetnames) data<-readxl::read_xlsx(xlsx_file,sheet=i) write.csv(data,file = stringr::str_c(i,".csv"),row.names = FALSE)

Latitude and Longitude use radians as units; Altitude use 'm' as units; Na use 'hour' as units;Tmax and Tmin use Celsius as units; Wind use m/s as units;RHmean and RHmin use percent sign as uits;Rs use MJ M-2 day-1 as units Height use cm as units;SoilWater and Irrigation use mm as units; GroundwaterDepth use cm as unit.