Skip to content

Instantly share code, notes, and snippets.

View eoduniyi's full-sized avatar
🔨

Erick Oduniyi eoduniyi

🔨
View GitHub Profile
@eoduniyi
eoduniyi / read_Witec.R
Created July 9, 2020 14:01
Benchmarking script for `hy.Spc.read.Witec` pkg
# Startup and benchmarking script for reading in Witec files
file <- "Witec_TrueMatch.txt"
read_Witec_TrueMatch_scan()
read_Witec_TrueMatch_read_csv()
read_Witec_TrueMatch_read_table()
read_Witec_TrueMatch_fread()
# Scan
read_Witec_TrueMatch_scan <- function(file, keys_2header = "all") {
@eoduniyi
eoduniyi / mutate.R
Created June 13, 2020 10:50
mutate and transmute for hyperSpec
#' mutate and transmute for hyperSpec objects
#'
#' @description dplyr::mutate() adds new variables and preserves all the existing variables.
#' Special column `$spc` contains the spectra matrix.
#'
#' @inheritParams dplyr::mutate
#' @inheritParams dplyr::transmute
#' @seealso [dplyr::mutate()]
#' @return hyperSpec object.
#' @include unittest.R
@eoduniyi
eoduniyi / update.dataset.R
Created June 9, 2020 15:04
update.dataset for hyperSpec
##' Update data sets for hyperSpec package
##'
##'
##' @return directory of edited R files and associated test logs
##'
##' @author Erick Oduniyi
##'
##' @keywords programming utilities
##' @examples
##' @export