The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
R package that contains Irucka Embry’s miscellaneous USGS functions (processing .exp and .psf files, statistical error functions, “+” dyadic operator for use with NA, creating ADAPS and QW spreadsheet files, calculating saturated enthalpy, etc.). Irucka created these functions while a Cherokee Nation Technology Solutions (CNTS) United States Geological Survey (USGS) Contractor and/or USGS employee.
install.packages("ie2misc")
With credit due to the matlab
package, for a complete
list of functions and the package DESCRIPTION file, use:
library(help = "ie2misc")
library("ie2misc")
require("stats")
# 1) Calculate the mean-absolute deviation (MAD)
set.seed(1003) # makes the example reproducible
<- rnorm(1003) # observed
obs1
# Using the default value of na.rm = FALSE
# using a matrix of the numeric vector obs1
<- matrix(data = obs1, nrow = length(obs1), ncol = 1, byrow = FALSE,
mat1 dimnames = list(c(rep("", length(obs1))), "Observed"))
madstat(mat1)
# 2) Compute the index of agreement (dr)
set.seed(300) # makes the example reproducible
<- rnorm(300) # observed
obs <- rnorm(300) # predicted
pre
# Using the default value of na.rm = FALSE
# using a matrix of the numeric vectors pre and obs
<- matrix(data = c(obs, pre), nrow = length(pre), ncol = 2, byrow = FALSE,
mat dimnames = list(c(rep("", length(pre))), c("Predicted", "Observed")))
dr(mat[, 2], mat[, 1])
# 3) Produce a saturated enthalpy table and direct the output to the console
sat_enthalpy2(elevation = 1810, tbegin = 28, tend = 80, tincrement = 0.1,
output = "console")
# elevation = 120 feet, tbegin = 32 degrees F, tend = 100 degrees F,
# tincrement = 0.1 degrees F
# 4) Create an .xlsx spreadsheet for each of the following water-quality data
# sets (follow the file dialog):
<- "https://waterdata.usgs.gov/nwis/dv?cb_80154=on&format=rdb"
file1 <- "&site_no=03584500&referred_module=sw&period=&begin_date=1904-07-01"
file2 <- "&end_date=2016-06-22"
file3 <- paste0(file1, file2, file3) # used to truncate the file name
file4 qw2(file4)
# USGS 03584500 ELK RIVER NEAR PROSPECT, TN
# Suspended sediment concentration, milligrams per liter (Mean)
<- "https://waterdata.usgs.gov/nwis/dv?cb_80155=on&format=rdb"
file5 <- "&site_no=03584500&referred_module=sw&period=&begin_date=1904-07-01"
file6 <- "&end_date=2016-06-22"
file7 <- paste0(file5, file6, file7) # used to truncate the file name
file8 qw2(file8)
# USGS 03584500 ELK RIVER NEAR PROSPECT, TN
# Suspended sediment discharge, tons per day (Mean)
This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy
Although this software program has been used by the U.S. Geological Survey (USGS), no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.
This software is provided “AS IS”.
Note: The datasets included in the extdata folder may not have received the USGS’s Director’s approval and thus may still be provisional and subject to revision. The data are included in this package for illustration purposes only. The data are released on the condition that neither the USGS nor the United States Government may be held liable for any damages resulting from its authorized or unauthorized use.
If you want to support the continued development of this and my other R packages, feel free to:
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.