These are simple convenience wrapper functions to import various HYPE data files as data frame into R.
ReadAquiferData(
filename = "AquiferData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)ReadOutregions(
filename = "Outregions.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadBranchData(
filename = "BranchData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadCropData(
filename = "CropData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadDamData(
filename = "DamData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
quote = "",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadFloodData(
filename = "FloodData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
quote = "",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadGlacierData(
filename = "GlacierData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadLakeData(
filename = "LakeData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
quote = "",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadMgmtData(
filename = "MgmtData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
...
)
ReadPointSourceData(
filename = "PointSourceData.txt",
verbose = TRUE,
header = TRUE,
na.strings = "-9999",
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
data.table = FALSE,
...
)
ReadAllsim(filename = "allsim.txt", na.strings = "-9999")
ReadForcKey(
filename = "ForcKey.txt",
sep = "\t",
encoding = c("unknown", "latin1", "UTF-8")
)
ReadUpdate(
filename = "update.txt",
header = TRUE,
sep = "\t",
stringsAsFactors = FALSE,
encoding = c("unknown", "latin1", "UTF-8"),
data.table = FALSE,
...
)
Imported files are returned as data frames.
Path to and file name of HYPE data file file to import. Windows users: Note that Paths are separated by '/', not '\'.
Logical, display message if columns contain NA values.
read.table or fread argument, with appropriate default for HYPE data file import.
See header.
See header.
See header.
read.table argument. Specify character encoding when
importing files created under Windows (default encoding "latin1") in Linux (default encoding "UTF-8")
and vice versa.
Other parameters passed to read.table.
See header.
Logical, return data.table instead of data frame. fread argument.
Hype data file imports, simple read.table or fread wrappers with
formatting arguments set to match HYPE file specifications:
In most files, HYPE requires NA-free input in required columns, but empty values are
allowed in additional comment columns. Informative warnings will be thrown if NAs are found during import.
te <- ReadForcKey(filename = system.file("demo_model", "ForcKey.txt", package = "HYPEtools"))
Run the code above in your browser using DataLab