Ahp
Analytical Hierarchy Process (AHP) with R
Install / Use
/learn @gluc/AhpREADME
Badges
Master
Dev
About this Package
An R package to model complex decision making problems using AHP (Analytic Hierarchy Process).
The basic workflow with this package is:
- specify your ahp problem in an ahp file
- load ahp file, using
LoadFile - calculate model, using
Calculate - output model analysis, either using
GetDataFrameor usingShowTable
For more information, see the package vignette using vignette("AHP car example")
There is also a Shiny app that complements that package. You can try it out at http://ipub.com/apps/ahp/
Example
devtools::install_github("gluc/ahp", build_vignettes = TRUE)
vignette("car-example", package = "ahp")
vignette("multiple-decisionmakers", package = "ahp")
# run analysis
library(ahp)
ahpFile <- system.file("extdata", "car.ahp", package="ahp")
carAhp <- Load(ahpFile)
Calculate(carAhp)
Visualize(carAhp)
Analyze(carAhp)
AnalyzeTable(carAhp)
# looking at the vacation example, a multi-decision-maker model
ahpFile <- system.file("extdata", "vacation.ahp", package="ahp")
vacationAhp <- Load(ahpFile)
Calculate(vacationAhp)
Analyze(vacationAhp, decisionMaker = "Dad")
AnalyzeTable(vacationAhp, decisionMaker = "Mom")
AnalyzeTable(vacationAhp)
To play around with the package, you may want to run the Shiny GUI that comes with the package:
RunGUI()

To play around with the example files in your dev environment, you may want to copy them out of the lib path, e.g. like so:
# On Windows
file.copy(ahpFile, "C:\\tmp")
# Or, on Linux:
file.copy(ahpFile, "~")
Then, open them in the text editor of your choice, and modify them. To run the analysis, do, for instance:
myVacation <- LoadFile("C:\\tmp\\vacation.ahp")
NOTE:
The latest from github dev branch may have some breaking changes compared to CRAN. See NEWS for details.
Getting Started
Conventions
Coding Conventions: Google Style Guide, see https://google-styleguide.googlecode.com/svn/trunk/Rguide.xml
Versioning Conventions: SemanticVersioning. See http://semver.org/ for details
Branching Conventions: GitFlow. See https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
Pull Requests: Very welcome. Please branch from dev.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
