create_modelDF {simET}R Documentation

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)

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.

Value

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

Note

The column of soilwater refers to the measured soil water (mm) in the maximum root layer, which is used to compare the difference between the simulated value and the measured value, which is an optional variable. The columns of Stage includes four stages: Ini, Development, Mid, End, which are mainly determined by LAI and growth status and can refer to Allen et al., (1998).


[Package simET version 1.0.3 Index]