R/data.R

Defines functions .pushDataRecords .pushDataFile .pushDataCond nonmem2rxRec.dat

Documented in nonmem2rxRec.dat

#' @export
#' @rdname nonmem2rxRec
nonmem2rxRec.dat <- function(x) {
  .x <- x
  class(.x) <- NULL
  .x <- paste(.x, collapse="\n")
  .nonmem2rx$dataCondType <- .Call(`_nonmem2rx_trans_data`, .x)
}

.pushDataCond <- function(cond) {
  if (nchar(cond) == 1L) {
    .nonmem2rx$dataIgnore1 <- cond
  } else {
    .nonmem2rx$dataCond <- c(.nonmem2rx$dataCond, cond)
  }
}

#' Push $data file name
#'  
#' @param file file name for nonmem input
#' @return nothing, called for side effect
#' @noRd
#' @author Matthew L. Fidler
.pushDataFile <- function(file) {
  .nonmem2rx$dataFile <- file
}
#' Push $data number of records  
#'  
#' @param rec Number of records
#' @return nothing, called for side effects
#' @noRd
#' @author Matthew L. Fidler
.pushDataRecords <- function(rec) {
  .nonmem2rx$dataRecords <- rec
}

Try the nonmem2rx package in your browser

Any scripts or data that you put into this service are public.

nonmem2rx documentation built on April 3, 2025, 11:05 p.m.