Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wincowgerDEV committed Jan 5, 2024
1 parent 1886d39 commit d3e592b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions R/match_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' \code{filter_spec()} filters an Open Specy object.
#' \code{os_similarity()} EXPERIMENTAL, returns a single similarity metric between two OpenSpecy objects based on the method used.
#' @param x an \code{OpenSpecy} object, typically with unknowns.
#' @param y an \code{OpenSpecy} object to perform similarity search against x.
#' @param conform Whether to conform the spectra to the library wavenumbers or not.
#' @param type the type of conformation to make returned by \code{conform_spec()}
#' @param library an \code{OpenSpecy} or \code{glmnet} object representing the
Expand Down
4 changes: 2 additions & 2 deletions R/read_ext.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ read_text <- function(file, colnames = NULL, method = "fread",
if(sum(grepl("^[0-9]{1,}$",colnames(dt))) > 4){
wavenumbers <- colnames(dt)[grepl("^[0-9]{1,}$",colnames(dt))]

spectra <- transpose(dt[,..wavenumbers])
spectra <- transpose(dt[,wavenumbers, with = FALSE])

metadata_names <- colnames(dt)[!grepl("^[0-9]{1,}$",colnames(dt))]

metadata <- dt[,..metadata_names]
metadata <- dt[, metadata_names, with = FALSE]

os <- as_OpenSpecy(x = as.numeric(wavenumbers), spectra = spectra, metadata = metadata)
}
Expand Down
2 changes: 2 additions & 0 deletions man/match_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d3e592b

Please sign in to comment.