R/to.greek.R

.to.greek <- function(instr) {
  alphabet <- c("alpha", "beta", "gamma", "delta", "epsilon", "zeta", 
    "eta", "theta", "iota", "kappa", "lambda", "mu", "nu", "xi", 
    "omicron", "pi", "rho", "sigma", "tau", "upsilon", "phi", "chi", 
    "psi", "omega")
  has.greek <- sapply(instr, function(l) 
      any(sapply(alphabet, function(x) length(grep(x, l, ignore.case=TRUE)) > 0)))
  instr[has.greek] <- parse(text=gsub(",", "*','*", instr[has.greek]))
  instr
}

Try the mcmcplots package in your browser

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

mcmcplots documentation built on May 2, 2019, 1:29 p.m.