This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bland-Altman plot R function. | |
# Author: [email protected] | |
baplot <- function(m1, m2, ...) { | |
# m1 and m2 are the measurements | |
means <- (m1 + m2) / 2 | |
diffs <- m1 - m2 | |
mdiff <- mean(diffs) | |
sddiff <- sd(diffs) | |
# Compute the figure limits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a <- c(4, 6, 3, 7, 3, 6, 3, 0) | |
mean(a) | |
sd(a) | |
median(a) | |
var(a) | |
a[1] | |
a[1:4] | |
a[c(1, 3, 8)] | |
# Comentario. Esto no se ejecuta. |