library(ahp) library(data.tree) vacation <- Load("vacation.ahp") # look at the structure vacation # look at some preference dfs vacation$preferences$Dad$pairwise$preferences # manipulate preferences by code newprefs <- structure(list(c1 = list("Costs", "Costs", "Fun"), c2 = list( "Fun", "Spa", "Spa"), preference = c(7, 2, 3)), .Names = c("c1", "c2", "preference"), row.names = c(NA, -3L), class = "data.frame") vacation$preferences$Dad$pairwise$preferences <- newprefs # reset voting powers by code (power to the children!): vacation$`decision-makers` <- c(Dad = 0.1, Mom = 0.2, Kid = 0.7) # ...except maybe for spa, that's still Mom's territory vacation$Spa$`decision-makers` <- c(Dad = 0.2, Mom = 0.7, Kid = 0.1) Calculate(vacation) ahp::Analyze(vacation)