-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load() is not reading pairwise #7
Comments
Your file doesn't seem to be indented correctly. I'm assuming this is a paste error. |
Thank you so much (sorry for the long delay on my side)! I have made a gist with both the yaml file and my R code. If you're able to tell me where I went wrong, it would be much appreciated! You can access the gist here: https://gist.github.com/xhan85/388d8e3e868a2663338bd1bd2883ee24 |
I had a quick look. Your file is in version 2, so you need to put Also you can load directly on the file path.
Using this, I get:
|
Thank you so much! |
I have made a yaml file and am trying to use the ahp package. I can use the yaml.load_file function but cannot use Load() because it returns that it cannot load the ahp model. I have found that it's running into problems with the pairwise comparison sections under preferences. When I use a bare bones version of my yaml file, it's able to be loaded. But once the pairwise comparisons are added back in, I keep getting the same error. It is having issues somewhere with parsing out the information in the pairwise comparison section. Thanks in advance!
My full yaml file is:
Version: 1.0
Alternatives: &alternatives
GIC Monitoring:
Geologic Data:
USGS:
Energy Infrastructure:
Variometer:
Goal:
name: Data Source
preferences:
pairwise:
- [Coverage, Cost, 2]
- [Coverage, Reliability, 1/3]
- [Cost, Reliability, 1/5]
children:
Coverage:
preferences:
pairwise:
- [Temporal, Spatial, 1/5]
children:
Temporal:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 8]
- [GIC Monitoring, USGS, 8]
- [GIC Monitoring, Energy Infrastructure, 8]
- [GIC Monitoring, Variometer, 9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 7]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 7]
- [Energy Infrastructure, Variometer, 7]
children: *alternatives
Spatial:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1/7]
- [GIC Monitoring, Variometer, 5]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1/7]
- [Geologic Data, Variometer, 5]
- [USGS, Energy Infrastructure, 1/7]
- [USGS, Variometer, 5]
- [Energy Infrastructure, Variometer, 5]
children: *alternatives
Cost:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1]
- [GIC Monitoring, Variometer, 1/9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 1/9]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 1/9]
- [Energy Infrastructure, Variometer, 1/9]
children: *alternatives
Reliability:
preferences:
pairwise:
- [GIC Monitoring, Geologic Data, 1]
- [GIC Monitoring, USGS, 1]
- [GIC Monitoring, Energy Infrastructure, 1]
- [GIC Monitoring, Variometer, 9]
- [Geologic Data, USGS, 1]
- [Geologic Data, Energy Infrastructure, 1]
- [Geologic Data, Variometer, 9]
- [USGS, Energy Infrastructure, 1]
- [USGS, Variometer, 9]
- [Energy Infrastructure, Variometer, 9]
children: *alternatives
End of Goal Section
#####################################
Here's what I'm running in R:
Session info -------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.3.2 (2016-10-31)
system x86_64, mingw32
ui RStudio (1.0.125)
language (EN)
collate English_United States.1252
tz America/New_York
date 2016-12-01
Packages -----------------------------------------------------------------------------------------------------------------------------------
package * version date source
ahp * 0.2.10 2016-11-27 CRAN (R 3.3.2)
backports 1.0.4 2016-10-24 CRAN (R 3.3.2)
colorspace 1.3-0 2016-11-10 CRAN (R 3.3.2)
curl 2.2 2016-10-21 CRAN (R 3.3.2)
data.tree * 0.6.2 2016-11-24 CRAN (R 3.3.2)
devtools * 1.12.0 2016-06-24 CRAN (R 3.3.2)
DiagrammeR 0.8.4 2016-07-17 CRAN (R 3.3.2)
digest 0.6.10 2016-08-02 CRAN (R 3.3.2)
evaluate 0.10 2016-10-11 CRAN (R 3.3.2)
formattable 0.2.0.1 2016-08-05 CRAN (R 3.3.2)
git2r 0.16.0 2016-11-20 CRAN (R 3.3.2)
htmltools 0.3.5 2016-03-21 CRAN (R 3.3.2)
htmlwidgets 0.8 2016-11-09 CRAN (R 3.3.2)
httr 1.2.1 2016-07-03 CRAN (R 3.3.2)
igraph 1.0.1 2015-06-26 CRAN (R 3.3.0)
influenceR 0.1.0 2015-09-03 CRAN (R 3.3.2)
jsonlite 1.1 2016-09-14 CRAN (R 3.3.2)
knitr 1.15.1 2016-11-22 CRAN (R 3.3.2)
magrittr 1.5 2014-11-22 CRAN (R 3.3.2)
memoise 1.0.0 2016-01-29 CRAN (R 3.3.2)
munsell 0.4.3 2016-02-13 CRAN (R 3.3.2)
plyr 1.8.4 2016-06-08 CRAN (R 3.3.2)
R6 2.2.0 2016-10-05 CRAN (R 3.3.2)
Rcpp 0.12.7 2016-09-05 CRAN (R 3.3.2)
rmarkdown 1.2 2016-11-21 CRAN (R 3.3.2)
rprojroot 1.1 2016-10-29 CRAN (R 3.3.2)
rstudioapi 0.6 2016-06-27 CRAN (R 3.3.2)
scales 0.4.1 2016-11-09 CRAN (R 3.3.2)
stringi 1.1.2 2016-10-01 CRAN (R 3.3.2)
stringr 1.1.0 2016-08-19 CRAN (R 3.3.2)
visNetwork 1.0.2 2016-10-05 CRAN (R 3.3.2)
withr 1.0.2 2016-06-20 CRAN (R 3.3.2)
yaml * 2.1.14 2016-11-12 CRAN (R 3.3.2)
The text was updated successfully, but these errors were encountered: