Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored tcplPlot and auxiliary functions to support any number of curves on a comparison plot #325

Open
wants to merge 94 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
e78590f
215 add in changes from pr #275 return ggplot obj
cthunes Dec 5, 2024
6dc2e09
fixed title bug with truncation, arrangeGrob bug in compare (temp fix)
cthunes Dec 6, 2024
adac4b9
added sc test cases with verbose = FALSE after discovering bug
cthunes Dec 6, 2024
d8b902e
solved arrangeGrob bug, now compare plots can be returned as ggplot ob
cthunes Dec 9, 2024
4812a9a
add ggplot output test cases
cthunes Dec 9, 2024
b879acc
293 removed tcplggplot and tcplggplotCompare functions
cthunes Jan 13, 2025
c22ca7f
293 add tcplggplot2 function alongside various utility functions
cthunes Jan 13, 2025
4f89329
293 update tcplPlotLoadData to include flag_count for tcplggplot2
cthunes Jan 13, 2025
1b91aa3
293 update tcplPlotLoadData to pull wllts down for missing chem info
cthunes Jan 13, 2025
2c5d80a
293 updated tcplPlotLoadData to replace nulls and flip bmr and cutoff
cthunes Jan 13, 2025
bcfcb60
293 updated validation for new and old parameters for tcplPlot update
cthunes Jan 13, 2025
4fe13ee
293 add function tcplPlotCalcAspectRatio to determine w/h/nrow/ncol
cthunes Jan 13, 2025
7234133
293 updated tcplPlot to handle new dat structure and compare parameter
cthunes Jan 13, 2025
c4b1639
293 updated tcplPlotlyPlot to work with single or dual plots, or stop
cthunes Jan 13, 2025
e957555
293 added stop to legacyplot since it didn't work and it def won't now
cthunes Jan 13, 2025
6e5a053
293 update all documentation and imports
cthunes Jan 13, 2025
db31596
293 fix bug with importing well types when none are missing
cthunes Jan 15, 2025
3a983f5
293 updated data_raw/sc_test.R for refactored tcplPlot
cthunes Jan 15, 2025
5ddf2e0
293 updated data_raw/mc_test.R for refactored tcplPlot
cthunes Jan 15, 2025
95464ae
293 updated existing tests in test-tcplPlot.R for refactored tcplPlot
cthunes Jan 15, 2025
c97b60f
293 fix coff overwrite bug in 'sc' if hitc/max_med both < 0
cthunes Jan 16, 2025
3e44717
293 updated 'compare' param documentation for 'sc' default
cthunes Jan 17, 2025
2fce037
293 added small validation that 'output' cannot be NULL
cthunes Jan 17, 2025
1dfb874
293 removed other files' tests
cthunes Jan 17, 2025
99b15a8
293 test multiple length compare
cthunes Jan 17, 2025
b64162e
293 updated standalone plot tests to reflect how they work now
cthunes Jan 17, 2025
79ec0b7
293 add case for validating 'compare' and 'by' as actual col names
cthunes Jan 17, 2025
28ae030
293 moved tcplPlotLoadData tests into new file and added expectations
cthunes Jan 17, 2025
884681f
293 moved tcplPlotUtils tests into new file, expanded tcplPlotValidate
cthunes Jan 17, 2025
600b58c
293 create new files for testing tcplggplot2.R and tcplggplot2Utils.R
cthunes Jan 17, 2025
f8be7bd
293 remove suppressWarnings from tcplPlot tests
cthunes Jan 21, 2025
9456088
293 update conc_resp in tcplggplot2 to resolve warnings with NA concs
cthunes Jan 21, 2025
c3b2d43
293 reduce list in tcplPlotValidate to only potentially updated ones
cthunes Jan 21, 2025
e77019b
293 update mc_test with missing chem test case for new LoadWllt test
cthunes Jan 23, 2025
61f07e6
293 add tcplPlotCalcAspectRatio tests and related small bug fix
cthunes Jan 23, 2025
a09f74f
removed the 'mocked$compare.<some id>' in test which now aren't stored
cthunes Jan 23, 2025
366f840
293 add group.fld/threshold tests, fix related group.fld bug in sc
cthunes Jan 23, 2025
0f5029b
293 add tcplggplot2 tests, add warning for comparing if !verbose,flags
cthunes Jan 23, 2025
5c0678c
293 add tests for tcplggplot2Utils MORELETTERS, tcplfit2_fun, round_n
cthunes Jan 23, 2025
2fe4806
293 add tcplggplot2Utils tests for rest of functions
cthunes Jan 24, 2025
cf4d137
Update docs for verbose = TRUE default changes
cthunes Jan 24, 2025
3907264
293 variable binding and imports for devtools::check()
cthunes Jan 24, 2025
0a6464b
311 plotting update for loec data, for mc single, small, large compare
cthunes Jan 29, 2025
e1680ae
311 add unit tests for loec for single, small/large and mixed compare
cthunes Jan 29, 2025
b4ffd1d
311 GH actions failed mac and linux r cmd check, attempting fix
cthunes Jan 29, 2025
e849642
117 add limitsize = FALSE to ggsave for large plots
cthunes Feb 5, 2025
fe1ca0d
215 add in changes from pr #275 return ggplot obj
cthunes Dec 5, 2024
ed00650
fixed title bug with truncation, arrangeGrob bug in compare (temp fix)
cthunes Dec 6, 2024
d43669d
added sc test cases with verbose = FALSE after discovering bug
cthunes Dec 6, 2024
9b797e2
solved arrangeGrob bug, now compare plots can be returned as ggplot ob
cthunes Dec 9, 2024
ed3eaab
add ggplot output test cases
cthunes Dec 9, 2024
d9403a2
293 removed tcplggplot and tcplggplotCompare functions
cthunes Jan 13, 2025
8b5e255
new files for git rebase
cthunes Jan 13, 2025
23cf610
293 update tcplPlotLoadData to include flag_count for tcplggplot2
cthunes Jan 13, 2025
0caa00c
293 update tcplPlotLoadData to pull wllts down for missing chem info
cthunes Jan 13, 2025
b75e1af
293 updated tcplPlotLoadData to replace nulls and flip bmr and cutoff
cthunes Jan 13, 2025
4e98bad
293 updated validation for new and old parameters for tcplPlot update
cthunes Jan 13, 2025
28d3f70
293 add function tcplPlotCalcAspectRatio to determine w/h/nrow/ncol
cthunes Jan 13, 2025
4a0c933
293 updated tcplPlot to handle new dat structure and compare parameter
cthunes Jan 13, 2025
d062f16
293 updated tcplPlotlyPlot to work with single or dual plots, or stop
cthunes Jan 13, 2025
3f89b70
293 added stop to legacyplot since it didn't work and it def won't now
cthunes Jan 13, 2025
301a1a9
293 update all documentation and imports
cthunes Jan 13, 2025
a82ff8d
293 fix bug with importing well types when none are missing
cthunes Jan 15, 2025
47a3e91
293 updated data_raw/sc_test.R for refactored tcplPlot
cthunes Jan 15, 2025
8dd2984
293 updated data_raw/mc_test.R for refactored tcplPlot
cthunes Jan 15, 2025
be2f0fe
293 updated existing tests in test-tcplPlot.R for refactored tcplPlot
cthunes Jan 15, 2025
32abdd3
293 fix coff overwrite bug in 'sc' if hitc/max_med both < 0
cthunes Jan 16, 2025
07d6c72
some of the commits for git rebase
cthunes Jan 17, 2025
4159767
293 added small validation that 'output' cannot be NULL
cthunes Jan 17, 2025
749cfa9
293 removed other files' tests
cthunes Jan 17, 2025
224c597
293 test multiple length compare
cthunes Jan 17, 2025
f320e70
293 updated standalone plot tests to reflect how they work now
cthunes Jan 17, 2025
c20d59f
293 add case for validating 'compare' and 'by' as actual col names
cthunes Jan 17, 2025
840a869
293 moved tcplPlotLoadData tests into new file and added expectations
cthunes Jan 17, 2025
c2c218e
293 moved tcplPlotUtils tests into new file, expanded tcplPlotValidate
cthunes Jan 17, 2025
cd47876
293 create new files for testing tcplggplot2.R and tcplggplot2Utils.R
cthunes Jan 17, 2025
6195e12
293 remove suppressWarnings from tcplPlot tests
cthunes Jan 21, 2025
3f75a6d
293 update conc_resp in tcplggplot2 to resolve warnings with NA concs
cthunes Jan 21, 2025
f348a76
293 reduce list in tcplPlotValidate to only potentially updated ones
cthunes Jan 21, 2025
17cb647
some more commits from rebase
cthunes Jan 23, 2025
30d9b27
293 add tcplPlotCalcAspectRatio tests and related small bug fix
cthunes Jan 23, 2025
b2c636a
removed the 'mocked$compare.<some id>' in test which now aren't stored
cthunes Jan 23, 2025
6104036
293 add group.fld/threshold tests, fix related group.fld bug in sc
cthunes Jan 23, 2025
f803673
293 add tcplggplot2 tests, add warning for comparing if !verbose,flags
cthunes Jan 23, 2025
63a32c3
293 add tests for tcplggplot2Utils MORELETTERS, tcplfit2_fun, round_n
cthunes Jan 23, 2025
cf22b43
293 add tcplggplot2Utils tests for rest of functions
cthunes Jan 24, 2025
eb681d0
more commits for rebase
cthunes Jan 24, 2025
a9f785e
293 variable binding and imports for devtools::check()
cthunes Jan 24, 2025
cab30bd
more commits for rebase
cthunes Jan 29, 2025
c76d1e8
311 add unit tests for loec for single, small/large and mixed compare
cthunes Jan 29, 2025
9b83614
311 GH actions failed mac and linux r cmd check, attempting fix
cthunes Jan 29, 2025
ccb6de6
117 add limitsize = FALSE to ggsave for large plots
cthunes Feb 5, 2025
189a5a4
Rebase dev onto 311-update-tcplPlot-for-loec for actions update
cthunes Feb 6, 2025
b99a1e8
Merge branch 'dev' into 311-update-tcplPlot-for-loec
cthunes Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ Imports:
gridExtra,
stringr,
rlang,
ctxR (>= 1.1.0)
ctxR (>= 1.1.0),
viridis,
gt
Suggests:
roxygen2,
knitr,
Expand All @@ -51,13 +53,13 @@ Suggests:
htmlTable,
testthat (>= 3.0.0),
reshape2,
viridis,
kableExtra,
colorspace,
magrittr,
vdiffr,
httptest,
rmdformats
rmdformats,
gtable
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 7.3.1
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export(tcpldbStats)
import(DBI)
import(data.table)
import(gridExtra)
import(gt)
import(stringr)
importFrom(RColorBrewer,brewer.pal)
importFrom(RMariaDB,MariaDB)
Expand All @@ -85,10 +86,12 @@ importFrom(dplyr,left_join)
importFrom(dplyr,matches)
importFrom(dplyr,mutate)
importFrom(dplyr,mutate_if)
importFrom(dplyr,n)
importFrom(dplyr,pull)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,summarise)
importFrom(dplyr,summarize)
importFrom(dplyr,tibble)
importFrom(dplyr,ungroup)
importFrom(ggplot2,aes)
Expand All @@ -103,6 +106,7 @@ importFrom(ggplot2,geom_vline)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggsave)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,is.ggplot)
importFrom(ggplot2,labs)
importFrom(ggplot2,margin)
importFrom(ggplot2,scale_color_manual)
Expand Down Expand Up @@ -157,6 +161,8 @@ importFrom(stats,median)
importFrom(stats,optim)
importFrom(stats,quantile)
importFrom(stats,setNames)
importFrom(stringr,str_count)
importFrom(stringr,str_trunc)
importFrom(tcplfit2,tcplfit2_core)
importFrom(tcplfit2,tcplhit2_core)
importFrom(tidyr,pivot_longer)
Expand All @@ -169,3 +175,4 @@ importFrom(utils,read.csv)
importFrom(utils,read.table)
importFrom(utils,tail)
importFrom(utils,write.table)
importFrom(viridis,viridis)
2 changes: 1 addition & 1 deletion R/mc5.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mc5 <- function(ae, wr = FALSE) {
modl_prob <- cnst_prob <- hill_er <- modl_tp <- modl_ga <- modl_gw <- NULL
hill_rmse <- hill_prob <- modl_acb <- modl_acc <- gnls_er <- modl_la <- NULL
gnls_la <- modl_lw <- gnls_lw <- gnls_rmse <- gnls_prob <- actp <- NULL
modl_ac10 <- model_type <- NULL
modl_ac10 <- model_type <- conc <- loec_hitc <- NULL

overwrite_osd <- FALSE

Expand Down
848 changes: 109 additions & 739 deletions R/tcplPlot.R

Large diffs are not rendered by default.

39 changes: 36 additions & 3 deletions R/tcplPlotLoadData.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@
#' @seealso \code{\link{tcplPlot}}
#'
#' @import data.table
#' @importFrom dplyr mutate group_by summarize rowwise
#' @importFrom stringr str_count
#' @export
tcplPlotLoadData <- function(type = "mc", fld = "m4id", val, flags = FALSE){
#variable binding
lvl <- m4id <- conc <- resp <- conc_unit <- NULL

# variable binding for R CMD check
lvl <- m4id <- conc <- resp <- conc_unit <- flag_count <- NULL
bmd <- top <- bmr <- model_type <- coff <- max_med <- hitc <- NULL

# Validate vars based on some assumed properties
validated_vars <- tcplPlotValidate(type = type,flags = flags)
Expand Down Expand Up @@ -95,6 +99,8 @@ tcplPlotLoadData <- function(type = "mc", fld = "m4id", val, flags = FALSE){
l6 <- data.table(m4id, "flag" = "None")
}
dat <- dat[l6, on = "m4id"]
dat$flag_count <- 0
dat[flag != "None", flag_count := stringr::str_count(flag, "\n") + 1]
}
dat
}
Expand All @@ -113,11 +119,15 @@ tcplPlotLoadData <- function(type = "mc", fld = "m4id", val, flags = FALSE){

#determine if we're single conc or multiconc based on dat
join_condition <- c("m4id","s2id")[c("m4id","s2id") %in% colnames(dat)]
conc_resp_table <- agg %>% group_by(.data[[join_condition]]) %>% summarise(conc = list(conc), resp = list(resp)) %>% as.data.table()
conc_resp_table <- agg %>% group_by(.data[[join_condition]]) %>% summarize(conc = list(conc), resp = list(resp)) %>% as.data.table()
dat <- dat[conc_resp_table, on = join_condition]

# get chemical and sample information
dat <- tcplPrepOtpt(dat)

# determine missing chem info and replace with string description of well type(s)
dat <- tcplPlotLoadWllt(dat, type)

} else {
# fix flags from API for plotting
if (flags == TRUE) {
Expand All @@ -138,5 +148,28 @@ tcplPlotLoadData <- function(type = "mc", fld = "m4id", val, flags = FALSE){
dat <- dat[conc_unit=="uM", conc_unit:="\u03BCM"]
dat <- dat[conc_unit=="mg/l", conc_unit:="mg/L"]

# replace null bmd in dat table
dat <- dat[is.null(dat$bmd), bmd:=NA]

#replace null top with 0
dat[is.null(dat$top), top := 0]
dat[is.na(top), top := 0]

# correct bmr and coff direction
if (type == "mc") {
# if top if less than 0, flip bmr no matter what
dat[top < 0, bmr := bmr * -1]
# if model type is loss, flip cut off
dat[model_type == 4, coff := coff * -1]
# if model type is bidirectional, flip cut off if top is less than 0
dat[model_type == 2 & top < 0, coff := coff * -1]
} else { # sc
# if max median is less than 0, flip cut off to align with it
dat[max_med < 0, coff := coff * -1]
# if hitc is less than 0, max median is in the opposite of intended direction,
# so flip cut off (possibly again)
dat[hitc < 0, coff := coff * -1]
}

dat
}
125 changes: 116 additions & 9 deletions R/tcplPlotUtils.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
#' tcplPlotLoadWllt
#' Replaces NA dtxsid and chnm with a string description of the sample's well type(s)
#'
#' @param dat dataset
#' @param type mc or sc
#'
#' @return dat with updated dtxsid/chnm if they are NA
#' @import data.table
#' @importFrom dplyr group_by summarize select left_join case_when
tcplPlotLoadWllt <- function(dat = NULL, type = "mc") {

# variable binding for R CMD check
dsstox_substance_id <- chnm <- aeid <- acid <- wllt <- wllt_desc <- NULL

# determine missing chemical info
missing <- dat[is.na(dsstox_substance_id) | is.na(chnm), .(spid, aeid)]
if (nrow(missing) > 0) {
acid_map <- tcplLoadAcid(fld = "aeid", val = missing$aeid)[,.(aeid,acid)]
missing <- missing[acid_map, on="aeid"]
l0_dat <- tcplLoadData(type = type, lvl = 0, fld = list("spid","acid"),
list(missing$spid, missing$acid))

# replace with string describing the well type(s)
wllts <- l0_dat |> select(acid, spid, wllt) |> group_by(acid, spid) |>
summarize(wllt_desc = dplyr::case_when(
all(unique(wllt) %in% c('c', 'p')) ~ "Gain-of-signal control",
all(unique(wllt) %in% c('m', 'o')) ~ "Loss-of-signal control",
all(unique(wllt) == 'n') ~ "Neutral/negative control",
all(unique(wllt) == 'b') ~ "Blank",
all(unique(wllt) == 'v') ~ "Viability control",
all(!is.na(unique(wllt))) && all(!is.null(unique(wllt))) ~ paste0("Well type: ", paste(unique(wllt), collapse = ", ")),
.default = NA
), .groups="drop") |> left_join(acid_map, by = "acid") |> as.data.table()
no_wllt <- wllts[is.na(wllt_desc), spid]
if (length(no_wllt)) warning(paste0("wllt for SPID(s): ", paste(no_wllt, collapse = ", "), " missing. Leaving dsstox_substance_id and chnm as NA."))
dat <- left_join(dat, wllts, by = c("aeid", "spid"))
dat[is.na(dsstox_substance_id) | is.na(chnm), c("dsstox_substance_id", "chnm") := wllt_desc]
}
dat

}


#' tcplPlotSetYRange
#'
#' @param dat dataset
Expand Down Expand Up @@ -47,17 +90,68 @@ tcplPlotSetYRange <- function(dat, yuniform, yrange, type) {
yrange
}

#' tcplPlotCalcAspectRatio
#'
#' @param type string of mc or sc indicating if it is single or multi conc
#' @param verbose should the plot return a table with parameters
#' @param multi Boolean, by default TRUE for "pdf". Prints variable number of plots
#' per page depending on 'verbose' and 'type' settings.
#' @param nrows number of rows each compare plot uses
#' @param output How should the plot be presented. To work with the plot in
#' environment, use "ggplot"; to interact with the plot in application, use
#' "console"; or to save as a file type, use "pdf", "jpg", "png", "svg", or "tiff".
#' @param group.threshold integer of length 1, number of curves where plot style
#' should change to instead group by a given group.fld, default of 9 -- greater
#' than 8 curves
#' @param nrow Integer, number of rows in multiplot. By default 2.
#' @param ncol Integer, number of columns in multiplot. By default 3, 2 if verbose,
#' 1 for compare plots.
#' @param flags Boolean, by default FALSE. If TRUE, level 6 flags are displayed
#' within output.
#'
#' @return a list of validated parameters for plotting
tcplPlotCalcAspectRatio <- function(type = "mc", verbose = FALSE, multi = FALSE, nrows = 0,
output = c("ggplot", "console", "pdf", "png", "jpg", "svg", "tiff"),
group.threshold = 9, nrow = NULL, ncol = NULL, flags = FALSE) {

# assign nrow = ncol = 1 for output="pdf" and multi=FALSE to plot one plot per page
if(output == "pdf" && multi == FALSE)
nrow <- ncol <- 1
w <- 7
h <- 5
if (verbose && any(nrows > 1 & nrows < group.threshold))
w <- 12
if (type == "sc" && any(!verbose, all(nrows == 1 | nrows >= group.threshold)))
w <- 5
if (type == "sc")
h <- 6
if (verbose && any(nrows > 1 & nrows < group.threshold))
h <- max(2 + max(nrows[nrows > 1 & nrows < group.threshold]), 6)
if (any(nrows >= group.threshold) && flags)
h <- max(h, 8)
if(is.null(nrow))
nrow <- max(round(10/h), 1)
if(is.null(ncol))
ncol <- max(round(14/w), 1)
list(w=w,h=h,nrow=nrow,ncol=ncol)
}

#' tcplPlotValidate
#'
#' @param dat data.table containing plot-prepared data
#' @param type string of mc or sc indicating if it is single or multi conc
#' @param compare Character vector, the field(s) to join samples on to create comparison
#' plots
#' @param by Parameter to divide files into e.g. "aeid".
#' @param flags bool - should we return flags
#' @param output how should the plot be formatted
#' @param multi are there multiple plots
#' @param verbose should the plot return a table with parameters
#'
#' @return a list of validated parameters for plotting
tcplPlotValidate <- function(type = "mc", flags = NULL, output = "none", multi = NULL, verbose = FALSE) {
tcplPlotValidate <- function(dat = NULL, type = "mc", compare = "m4id", by = NULL,
flags = NULL, output = c("ggplot", "console", "pdf", "png", "jpg", "svg", "tiff"),
multi = NULL, verbose = FALSE) {
# set lvl based on type
lvl <- 5
if (type == "sc") {
Expand All @@ -66,28 +160,41 @@ tcplPlotValidate <- function(type = "mc", flags = NULL, output = "none", multi =
warning("'flags' was set to TRUE - no flags exist for plotting single concentration")
flags <- FALSE
}
if (compare == "m4id") compare <- "s2id"
}

# default assign multi=TRUE for output="pdf"
if (output == "pdf" && is.null(multi)) {
multi <- TRUE

if (!is.null(by) && length(by) > 1) stop("'by' must be of length 1.")
if (length(output) > 1) output <- output[1] else if (length(output) == 0) stop("'output' cannot be NULL")

if (!is.null(dat) && !is.data.table(dat)) {
if (!is.list(dat) || !is.data.table(dat[[1]])) {
stop("'dat' must be a data.table or a list of data.tables.")
}
if (!compare %in% c("m4id", "s2id")) {
warning("'dat' provided as list of list of data tables, meaning compare plots are already subdivided. 'compare' field will be ignored and have no effect.")
}
if (!is.null(by)) {
warning("Using 'by' can have unintended consequences when 'dat' is provided as a list of data.tables. Instead, consider adding a custom field to group comparison plots, and specify using the 'compare' parameter. Then, use 'by' to split plots into files.")
}
}

# default assign multi=TRUE for output="pdf"
if (output == "pdf" && is.null(multi)) multi <- TRUE
# forced assign multi=FALSE for output = c("console","png","jpg","svg","tiff"), verbose=FALSE for output="console"
if (output != "pdf") {
multi <- FALSE
if (output == "console") {
verbose <- FALSE
}
if (output == "console") verbose <- FALSE
}

list(lvl = lvl, type = type, flags = flags, output = output, multi = multi, verbose = verbose)
list(lvl = lvl, compare = compare, flags = flags, output = output, multi = multi, verbose = verbose)
}


#' tcplLegacyPlot
#'
#' @return a ggplot based on old plotting methodology
tcplLegacyPlot <- function() {
stop("Legacy plotting is currently unsupported.")
# VARIABLE BINDING
fld <- val <- lvl <- multi <- fileprefix <- NULL
if (length(output) > 1) output <- output[1]
Expand Down
2 changes: 1 addition & 1 deletion R/tcplSubsetChid.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
tcplSubsetChid <- function(dat, flag = TRUE, type = "mc", export_ready = FALSE) {
## Variable-binding to pass R CMD Check
chit <- hitc <- aeid <- casn <- fitc <- fitc.ordr <- m4id <- nflg <- NULL
chid <- conc <- minc <- NULL
chid <- conc <- minc <- actc <- NULL

if (!type %in% c("mc", "sc")) {
stop("type must be sc (single concentration) or mc (multi-concentration)")
Expand Down
Loading
Loading