Learn R Programming

dynafluxr (version 1.0.1)

cli: Function to be called from shell command line

Description

Function to be called from shell command line

Usage

cli(args = commandArgs(trailingOnly = TRUE))

Value

a list resulting from fdyn() call

Arguments

args

Character vector, command line parameters (default commandArgs(trailingOnly=TRUE))

Details

run cli("-h") in R or Rscript -e 'dynafluxr::cli()' -h in shell to get a help page with available option description

See Also

fdyn

Examples

Run this code
  # from shell
  # $ Rscript --vanilla -e 'dynafluxr::cli()' -m data_kinetics.tsv -s glycolysis.txt

  # from R session
  ddir=system.file("dataglyco", package="dynafluxr")
  meas=file.path(ddir, "data.tsv")
  sto=file.path(ddir, "network.txt")
  res=cli(c("-m", meas, "-s", sto, "--skip", "24", "-o", ""))
  tp=res$tp
  np=length(tp)
  tpp=res$tpp
  # plot species
  matplot(tpp, res$msp(tpp), type="l")
  matpoints(tp, res$mf[,-1], pch=".", cex=0.5)
  legend("topright", legend=colnames(bsppar(res$msp)$qw), lty=1:5, col=1:6, cex=0.75)
  # plot rates
  dev.new()
  matplot(tpp, res$vsp(tpp), type="l")
  # plot residuals
  dev.new()
  matplot(tpp, res$risp(tpp), type="l")
  legend("topright", legend=colnames(bsppar(res$rsp)$qw), lty=1:5, col=1:6, cex=0.75)

Run the code above in your browser using DataLab