Browse Source

Fix NOTE in `R CMD check`: `join_spc_chem: no visible binding for global variable `dat_chem``

pull/3/head
Philipp Baumann 7 years ago
parent
commit
39aa3a05d1
  1. 4
      R/join-chem-spectra.R

4
R/join-chem-spectra.R

@ -10,6 +10,7 @@
#' @export
join_chem_spec <- function(
dat_chem, dat_spec, by = "sample_ID") {
# Alternative when "no visible binding for global variable":
data_meta <- MIR <- MIR_pre <- ori <- MIR_mean <- NULL
# http://stackoverflow.com/questions/23475309/in-r-is-it-possible-to-suppress-note-no-visible-binding-for-global-variable
@ -45,8 +46,9 @@ join_chem_spec <- function(
#' @return Tibble joined by sample_id
#' @export
join_spc_chem <- function(spc_tbl, chem_tbl, by = "sample_id") {
if(!tibble::is_tibble(spc_tbl)) {
stop(dat_chem, "needs to be a Tibble", call. = FALSE)
stop(spc_tbl, "needs to be a Tibble", call. = FALSE)
} else {
# Rename column sample_ID to sample_id if sample_ID exists
if("sample_ID" %in% colnames(chem_tbl)) {

Loading…
Cancel
Save