Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions R/ds.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,12 @@ if(num.table.dims==1)

}#END second dim=1 loop

#################################################
# Setup on.exit() to restore options 'warn' value
#################################################

old_warn_option <- base::getOption("warn")
on.exit(base::options(warn = old_warn_option), add = TRUE)

################################
#NOW UNDERTAKE CHISQUARED TESTS#
Expand Down
7 changes: 7 additions & 0 deletions R/ds.table2D.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ ds.table2D <- function(x=NULL, y=NULL, type='both', warningMessage=TRUE, datasou
stop("Function argument 'type' has to be either 'combine', 'split' or 'both'")
}

#################################################
# Setup on.exit() to restore options 'warn' value
#################################################

old_warn_option <- base::getOption("warn")
on.exit(base::options(warn = old_warn_option), add = TRUE)

# the input variable might be given as column table (i.e. D$x)
# or just as a vector not attached to a table (i.e. x)
# we have to make sure the function deals with each case
Expand Down
8 changes: 8 additions & 0 deletions R/glmChecks.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ glmChecks <- function(formula, data, offset, weights, datasources){
varIdentifier <- append(varIdentifier, "weights")
}

#################################################
# Setup on.exit() to restore options 'warn' value
#################################################

old_warn_option <- base::getOption("warn")
on.exit(base::options(warn = old_warn_option), add = TRUE)


# check that each variable is defined and not empty and each study. Stop the process if any check fails
stdnames <- names(datasources)
for(i in 1:length(elts)){
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/perf_files/default_perf_profile.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"ds.asNumeric::perf:0","2.185","0.5","2"
"ds.assign::perf::0","5.490","0.5","2"
"ds.class::perf::combine:0","4.760","0.5","2"
"ds.colnames::perf:0","4.159","0.5","2"
"ds.colnames::perf:0","9.079","0.5","2"
"ds.exists::perf::combine:0","11.09","0.5","2"
"ds.length::perf::combine:0","9.479","0.5","2"
"ds.mean::perf::combine:0","9.650","0.5","2"
"ds.mean::perf::split:0","11.26","0.5","2"
"void::perf::void::0","46250.0","0.5","2"
"void::perf::void::0","46250.0","0.5","2"
2 changes: 1 addition & 1 deletion tests/testthat/perf_files/opal_azure-pipeline.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ds.asNumeric::perf:0","2.185","0.5","2"
"ds.assign::perf::0","5.490","0.5","2"
"ds.class::perf::combine:0","4.760","0.5","2"
"ds.colnames::perf:0","4.159","0.5","2"
"ds.colnames::perf:0","9.079","0.5","2"
"ds.exists::perf::combine:0","11.09","0.5","2"
"ds.length::perf::combine:0","9.479","0.5","2"
"ds.mean::perf::combine:0","9.650","0.5","2"
Expand Down