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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: naryn
Title: Native Access Medical Record Retriever for High Yield Analytics
Version: 2.6.30.9000
Version: 2.6.31
Authors@R: c(
person("Misha", "Hoichman", , "misha@hoichman.com", role = "aut"),
person("Aviezer", "Lifshitz", , "aviezer.lifshitz@weizmann.ac.il", role = c("aut", "cre")),
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# naryn (development version)
# naryn 2.6.31

* Removed non-API calls to `Rf_GetOption` in the C++ code.

# naryn 2.6.30

Expand Down
5 changes: 1 addition & 4 deletions R/db.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#' variables are added to the .naryn environment. These variables should not be
#' modified by the user!
#'
#' \tabular{lll}{
#' \tabular{ll}{
#' .naryn$EMR_GROOT \tab First db dir of tracks in the order of connections \cr
#' .naryn$EMR_UROOT \tab Last db dir of tracks in the order of connection (user dir) \cr
#' .naryn$EMR_ROOTS \tab Vector of directories (db_dirs) \cr
Expand Down Expand Up @@ -208,7 +208,6 @@ emr_db.init_examples <- function(n_dbs = 1) {
}



#' Reloads database
#'
#' Reloads database
Expand Down Expand Up @@ -292,7 +291,6 @@ emr_db.subset <- function(src = "", fraction = NULL, complementary = NULL) {
}



#' Returns the ids that constitute the current ids subset
#'
#' Returns the ids that constitute the current ids subset.
Expand All @@ -312,7 +310,6 @@ emr_db.subset.ids <- function() {
}



#' Returns information about the current subset
#'
#' Returns information about the current subset.
Expand Down
5 changes: 0 additions & 5 deletions R/extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ emr_cor <- function(..., cor.exprs = NULL, include.lowest = FALSE, right = TRUE,
}



#' Calculates distribution of track expressions
#'
#' Calculates distribution of track expressions' values over the given set of
Expand Down Expand Up @@ -300,7 +299,6 @@ emr_extract <- function(expr, tidy = FALSE, sort = FALSE, names = NULL, stime =
}



#' Returns ids coverage per track
#'
#' Returns ids coverage per track.
Expand Down Expand Up @@ -534,7 +532,6 @@ emr_ids_vals_coverage <- function(ids, tracks, stime = NULL, etime = NULL, filte
}



#' Calculates quantiles of a track expression
#'
#' Calculates quantiles of a track expression for the given percentiles.
Expand Down Expand Up @@ -576,7 +573,6 @@ emr_quantiles <- function(expr, percentiles = 0.5, stime = NULL, etime = NULL, i
}



#' Finds Id-Time points that match track expression
#'
#' Finds all patient-time pairs where track expression is 'TRUE'.
Expand Down Expand Up @@ -622,7 +618,6 @@ emr_screen <- function(expr, sort = FALSE, stime = NULL, etime = NULL, iterator
}



#' Calculates summary statistics of track expression
#'
#' Calculates summary statistics of track expression.
Expand Down
4 changes: 0 additions & 4 deletions R/filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
}



#' Generate a default name for a naryn filter
#'
#' Generate a default name for a naryn filter
Expand Down Expand Up @@ -747,7 +746,6 @@ emr_filter.attr.expiration <- function(filter, expiration) {
}



#' Checks whether the named filter exists
#'
#' Checks whether the named filter exists.
Expand Down Expand Up @@ -829,7 +827,6 @@ emr_filters.info <- function(filter) {
}



#' Returns a list of named filters
#'
#' Returns a list of named filters.
Expand Down Expand Up @@ -876,7 +873,6 @@ emr_filter.ls <- function(pattern = "", ignore.case = FALSE, perl = FALSE, fixed
}



#' Deletes a named filter
#'
#' Deletes a named filter.
Expand Down
4 changes: 0 additions & 4 deletions R/time.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ emr_time2hour <- function(time) {
}



#' Converts time from internal format to a day of month
#'
#' Converts time from internal format to a day of month.
Expand Down Expand Up @@ -63,7 +62,6 @@ emr_time2dayofmonth <- function(time) {
}



#' Converts time from internal format to a month
#'
#' Converts time from internal format to a month.
Expand Down Expand Up @@ -96,7 +94,6 @@ emr_time2month <- function(time) {
}



#' Converts time from internal format to a year
#'
#' Converts time from internal format to a year.
Expand Down Expand Up @@ -128,7 +125,6 @@ emr_time2year <- function(time) {
}



#' Converts date and hour to internal time format
#'
#' Converts date and hour to internal time format.
Expand Down
2 changes: 0 additions & 2 deletions R/track-attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ emr_track.attr.get <- function(track = NULL, attr = NULL) {
}



#' Deletes a track attribute
#'
#' Deletes a track attribute.
Expand Down Expand Up @@ -169,7 +168,6 @@ emr_track.attr.rm <- function(track, attr) {
}



#' Assigns a value to the track attribute
#'
#' Assigns a value to the track attribute.
Expand Down
3 changes: 0 additions & 3 deletions R/track-vars.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ emr_track.var.get <- function(track, var) {
}



#' Returns a list of track variables for a track
#'
#' Returns a list of track variables for a track.
Expand Down Expand Up @@ -119,7 +118,6 @@ emr_track.var.ls <- function(track, pattern = "", ignore.case = FALSE, perl = FA
}



#' Deletes a track variable
#'
#' Deletes a track variable.
Expand Down Expand Up @@ -174,7 +172,6 @@ emr_track.var.rm <- function(track, var) {
}



#' Assigns value to a track variable
#'
#' Assigns value to a track variable.
Expand Down
8 changes: 0 additions & 8 deletions R/track.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
}



#' Adds new records to a track
#'
#' Adds new records to a track from a TAB-delimited file or a data frame.
Expand Down Expand Up @@ -239,7 +238,6 @@ emr_track.create <- function(track, space, categorical, expr, stime = NULL, etim
}



#' Checks whether the track exists
#'
#' Checks whether the track exists.
Expand Down Expand Up @@ -298,7 +296,6 @@ multiple_tracks_exist <- function(tracks, db_id = NULL) {
}



#' Returns track ids
#'
#' Returns the ids contained by the track.
Expand Down Expand Up @@ -327,7 +324,6 @@ emr_track.ids <- function(track) {
}



#' Imports a track from a file or data-frame
#'
#' Imports a track from a file or data-frame.
Expand Down Expand Up @@ -624,8 +620,6 @@ emr_track.logical.ls <- function(..., ignore.case = FALSE, perl = FALSE, fixed =
}




#' Moves (renames) a track
#'
#' Moves (renames) a track
Expand Down Expand Up @@ -714,7 +708,6 @@ emr_track.mv <- function(src, tgt, space = NULL) {
}



#' Returns track percentile of the values
#'
#' Returns track percentile of the values.
Expand Down Expand Up @@ -770,7 +763,6 @@ emr_track.percentile <- function(track, val, lower = TRUE) {
}



#' Gets or sets "read-only" property of a track
#'
#' Gets or sets "readonly" property of a track.
Expand Down
5 changes: 0 additions & 5 deletions R/vtrack.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ emr_vtrack.create <- function(vtrack, src, func = NULL, params = NULL, keepref =
}



#' Get or set attributes of a virtual track
#'
#' Get or set attributes of a virtual track.
Expand Down Expand Up @@ -640,7 +639,6 @@ emr_vtrack.attr.filter <- function(vtrack, filter) {
}



#' Checks whether the virtual track exists
#'
#' Checks whether the virtual track exists.
Expand Down Expand Up @@ -671,7 +669,6 @@ emr_vtrack.exists <- function(vtrack) {
}



#' Returns the definition of a virtual track
#'
#' Returns the definition of a virtual track.
Expand All @@ -697,7 +694,6 @@ emr_vtrack.info <- function(vtrack) {
}



#' Returns a list of virtual track names
#'
#' Returns a list of virtual track names.
Expand Down Expand Up @@ -743,7 +739,6 @@ emr_vtrack.ls <- function(pattern = "", ignore.case = FALSE, perl = FALSE, fixed
}



#' Deletes a virtual track
#'
#' Deletes a virtual track.
Expand Down
3 changes: 1 addition & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
.naryn$entries <- list()
.naryn$entries_timestamp <- list()

.onLoad <- function(lib, pkg) {
}
.onLoad <- function(lib, pkg) {}

.onAttach <- function(lib, pkg) {
Sys.umask("007")
Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

0 errors | 0 warnings | 0 notes

* Fixed *noRemap* additional issue.
* Removed non-API calls to R: 'PRENV', 'PRVALUE', 'R_PromiseExpr'.
* Removed non-API calls to `Rf_GetOption`.
2 changes: 1 addition & 1 deletion man/emr_db.connect.Rd

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

2 changes: 1 addition & 1 deletion src/NRTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ SEXP logical_track_vtrack(SEXP _track, SEXP envir){
// for (int i = 0; i < num_processes; ++i) {
// if (!g_naryn->launch_process()) { // kid process
// if (g_naryn->debug()){
// SEXP rvar = Rf_GetOption(Rf_install("emr_child_run_delay"), R_NilValue);
// SEXP rvar = Rf_GetOption1(Rf_install("emr_child_run_delay"));
// if (Rf_isReal(rvar) || Rf_isInteger(rvar))
// sleep(Rf_asInteger(rvar));
// }
Expand Down
18 changes: 9 additions & 9 deletions src/naryn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ pid_t Naryn::launch_process()
sigaction(SIGALRM, &s_old_sigalrm_act, NULL);
sigaction(SIGCHLD, &s_old_sigchld_act, NULL);

SEXP r_multitasking_stdout = Rf_GetOption(Rf_install("emr_multitasking_stdout"), R_NilValue);
SEXP r_multitasking_stdout = Rf_GetOption1(Rf_install("emr_multitasking_stdout"));

int devnull;
if ((devnull = open("/dev/null", O_RDWR)) == -1){
Expand Down Expand Up @@ -495,43 +495,43 @@ void Naryn::load_options()
{
SEXP rvar;

rvar = Rf_GetOption(Rf_install("emr_debug"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_debug"));
if (Rf_isLogical(rvar)){
m_debug = Rf_asLogical(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_multitasking"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_multitasking"));
if (Rf_isLogical(rvar)){
m_multitasking_avail = Rf_asLogical(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_min.processes"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_min.processes"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asInteger(rvar) >= 1){
m_min_processes = Rf_asInteger(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_max.processes"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_max.processes"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asInteger(rvar) >= 1){
m_max_processes = Rf_asInteger(rvar);
}
m_max_processes = max(m_min_processes, m_max_processes);

rvar = Rf_GetOption(Rf_install("emr_max.data.size"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_max.data.size"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asReal(rvar) >= 1){
m_max_data_size = (uint64_t)Rf_asReal(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_eval.buf.size"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_eval.buf.size"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asInteger(rvar) >= 1){
m_eval_buf_size = Rf_asInteger(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_quantile.edge.data.size"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_quantile.edge.data.size"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asReal(rvar) >= 0){
m_quantile_edge_data_size = (uint64_t)Rf_asReal(rvar);
}

rvar = Rf_GetOption(Rf_install("emr_warning.itr.no.filter.size"), R_NilValue);
rvar = Rf_GetOption1(Rf_install("emr_warning.itr.no.filter.size"));
if ((Rf_isReal(rvar) || Rf_isInteger(rvar)) && Rf_asReal(rvar) >= 1){
m_beat_itr_warning_size = (uint64_t)Rf_asReal(rvar);
}
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-logical_tracks.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ test_that("emr_track.logical.create tracks works in batch mode length of values
})



test_that("emr_track.logical.create fails when track length do not equal names length", {
expect_error(emr_track.logical.create(c("a", "b"), c("ph1")))
})
Expand Down