## NOTE: The plots in the website look squashed because of how pkgdown
## generates them. They should look fine when you generate them yourself.
extdata_dir <- system.file(package="eaf", "extdata")
A1 <- read_datasets(file.path(extdata_dir, "ALG_1_dat.xz"))
A2 <- read_datasets(file.path(extdata_dir, "ALG_2_dat.xz"))
# These take time
eafdiffplot(A1, A2, full.eaf = TRUE)
if (requireNamespace("viridisLite", quietly=TRUE)) {
viridis_r <- function(n) viridisLite::viridis(n, direction=-1)
eafdiffplot(A1, A2, type = "area", col = viridis_r)
} else {
eafdiffplot(A1, A2, type = "area")
}
A1 <- read_datasets(file.path(extdata_dir, "wrots_l100w10_dat"))
A2 <- read_datasets(file.path(extdata_dir, "wrots_l10w100_dat"))
eafdiffplot(A1, A2, type = "point", sci.notation = TRUE, cex.axis=0.6)
# A more complex example
DIFF <- eafdiffplot(A1, A2, col = c("white", "blue", "red"), intervals = 5,
type = "point",
title.left=expression("W-RoTS," ~ lambda==100 * "," ~ omega==10),
title.right=expression("W-RoTS," ~ lambda==10 * "," ~ omega==100),
right.panel.last={
abline(a = 0, b = 1, col = "red", lty = "dashed")})
DIFF$right[,3] <- -DIFF$right[,3]
## Save the values to a file.
# write.table(rbind(DIFF$left,DIFF$right),
# file = "wrots_l100w10_dat-wrots_l10w100_dat-diff.txt",
# quote = FALSE, row.names = FALSE, col.names = FALSE)
Run the code above in your browser using DataLab