R/graph2latex.R

Defines functions getLaTeXFraction

getLaTeXFraction <- function(x) {
  result <- c()
  for (nom in strsplit(as.character(getFractionString(x)), split = "/")) {
    if (length(nom) == 1) {
      result <- c(result, nom)
    } else {
      result <- c(result, paste("\\frac{", nom[1], "}{", nom[2], "}", sep = ""))
    }
  }
  return(result)
}
allenzhuaz/gMCPmini documentation built on Sept. 3, 2022, 10:27 a.m.