R/cmaRs.identical_function.R

Defines functions cmaRs.identical_function

cmaRs.identical_function <- function(DMS, i, j, number, xfirst_data, n)
                                     # this function prepare DMS for evaluation.
                                     # DMS: symbolic derivative matrix
                                     # i:row index
                                     # j: column index  number
                                     # number: the number that is tested
                                     # xfirst_data: the data that includes
                                     # xfirst variables
# n: sample size
{
  if (identical(with(
    xfirst_data,
    eval(parse(text = DMS[i, j]))
  ), number)) {
    istr <- as.character(number)
    DMS[i, j] <- paste("matrix", "(",
      istr, ", nrow <- (n+1), ncol <- 1)",
      sep = ""
    )
  }
  return(DMS = DMS) # output
} # end of function identical_function

Try the cmaRs package in your browser

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

cmaRs documentation built on July 9, 2023, 5:17 p.m.