Jeyy Jeyy - 7 months ago 27
R Question

Could not find LoadFile() even if a guide says it should exist, am I or the guide wrong? In R

I need to perform an analytic hierarchical process (AHP) on a dataset using R. I have basic understanding of navigation and can follow most guides to perform rudiment analyses. However, I'm not comfortable enough to be sure if I or the guide is wrong.

The guide I've followed is this: https://www.r-bloggers.com/analytic-hierarchy-process-ahp-with-the-ahp-package/.
(I run R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch")

1: I have (successfully) installed and loaded the AHP package using:

devtools::install_github("gluc/ahp", build_vignettes = install.packages("data.tree"))


2: I have (successfully) set working directory using:

setwd("myworkingdirectory")


3: I have attempted (PROBLEM) loaded the file to a variable using:

myahp <- LoadFile("myAHPfile.txt")
Error: could not find function "LoadFile"


3x: As diagnosis I run:

getAnywhere("LoadFile")
no object named ‘LoadFile’ was found


For your information: Step 3x is inspired by this SO answer (Error: could not find function ... in R)

Can someone tell me what I am doing wrong? I greatly appreciate any help.

Answer Source

Both. The guide refers to an old version of the gap package from github. With the latest version from cran (0.2.11), the function is now called Load, and the file format has changed. If you just want to goof around with the package, I can recommend the online app at ipub.com. If you insist on following the guide, make sure you get version 0.1.1 from github