gluc / ahp

Analytical Hierarchy Process (AHP) with R
97 stars 41 forks source link

How to handle "car.ahp" file? #2

Closed jjangkr closed 8 years ago

jjangkr commented 8 years ago

I edited little bit on "car.ahp" file to test and rename it as "car2.ahp". Then I tried to load it.

The error message for this is as below;

library(ahp) ahpFile2 <- system.file("extdata", "car2.ahp", package="ahp") carAhp2 <- LoadFile(ahpFile2) Warning message: In file(con, "r") : file("") only supports open = "w+" and open = "w+b": using the former

How do I handle it? Do I have to make "example.ahp" by using "yaml" type file? Then how can I edit and save "yaml" file. Text editor is not working.

gluc commented 8 years ago

I cannot reproduce that error. But in any case, I suggest not messing around with your libPaths. So, what I would do is:

  1. copy the file car.ahp to a folder where you have adequate permissions, e.g. your home directory (on linux) or My Documents on Windows
  2. edit the file in a text editor (e.g. nano, or Notepad++)
  3. use LoadFile directly on the copied file, e.g. LoadFile("home/my_ahp_tests/car2.ahp")