# NOT RUN {
# Examples from Cugmas and Ferligoj (2018) paper:
data(examples)
# increase k in real analyses
# EXAMPLES: A, B, C, D
par(mfrow = c(4, 4))
for (i in 1:4){
U <- fromTableToVectors(examples[[i]])[,1]
V <- fromTableToVectors(examples[[i]])[,2]
cat("MARI", MARI(U = U, V = V, k = 100), "\n")
}
# EXAMPLES: E, F, G, H
for (i in 13:16){
U <- fromTableToVectors(examples[[i]])[,1]
V <- fromTableToVectors(examples[[i]])[,2]
U[which(max(as.numeric(as.character(U))) == as.numeric(as.character(U)))] <- NA
V[which(max(as.numeric(as.character(V))) == as.numeric(as.character(V)))] <- NA
cat("MARI", MARI(U = U, V = V, k = 100), "\n")
}
# EXAMPLES: I, J, K, L
for (i in 5:8){
U <- fromTableToVectors(examples[[i]])[,1]
V <- fromTableToVectors(examples[[i]])[,2]
V[which(max(as.numeric(as.character(V))) == as.numeric(as.character(V)))] <- NA
cat("MARI", MARI(U = U, V = V, k = 100), "\n")
}
# EXAMPLES: M, N, O, P
for (i in 9:12){
U <- fromTableToVectors(examples[[i]])[,1]
V <- fromTableToVectors(examples[[i]])[,2]
U[which(max(as.numeric(as.character(U))) == as.numeric(as.character(U)))] <- NA
cat("MARI", MARI(U = U, V = V, k = 100), "\n")
}
# }
Run the code above in your browser using DataLab