0

I am quite new in R and I want to edit R standard files. In particular I want to edit plot.TukeyHSD. If I type its name in R I can see the source code,

> plot.TukeyHSD
function (x, ...) 
{
   for (i in seq_along(x)) 
   {
     xi <- x[[i]][, -4L, drop = FALSE]
     yvals <- nrow(xi):1L
     dev.hold()
     on.exit(dev.flush())
     plot(c(xi[, "lwr"], xi[, "upr"]), rep.int(yvals, 2L), 
     type = "n", axes = FALSE, xlab = "", ylab = "", main = NULL, ...)
      axis(1, ...)
    axis(2, at = nrow(xi):1, labels = dimnames(xi)[[1L]], 
        srt = 0, ...)
    abline(h = yvals, lty = 1, lwd = 0.5, col = "lightgray")
    abline(v = 0, lty = 2, lwd = 0.5, ...)
    segments(xi[, "lwr"], yvals, xi[, "upr"], yvals, ...)
    segments(as.vector(xi), rep.int(yvals - 0.1, 3L), as.vector(xi), 
       rep.int(yvals + 0.1, 3L), ...)
    title(main = paste0(format(100 * attr(x, "conf.level"), 
        digits = 2L), "% family-wise confidence level\n"), 
        xlab = paste("Differences in mean levels of", names(x)[i]))
    box()
    dev.flush()
    on.exit()
    }
}

My problem is that I can't find where it is to edit it. I know that R is typically installed on /usr/lib64/R/ in Linux/Unix, but I can't find this function there.

mad
  • 2,677
  • 8
  • 35
  • 78

0 Answers0