data(airquality)
airq <- airquality[, 1:4]
# example 1:
x <- pairDist(airq, roundit = 3)
# example 2:
y <- pairDist(airq, scale = TRUE, roundit = 5)
# example 3
data <- matrix(
c(1, 5, NA, 4, 5, 6, NA, 8, 9, NA, 12, 23, 6, 0, 3, 3, 8, 15),
ncol = 3,
byrow = TRUE
)
dist <- pairDist(data, roundit = 2)
dist_scaled <- pairDist(data, scale = TRUE, roundit = 6)
Run the code above in your browser using DataLab