I am applying the multicriteria decision analysis method called PROMETHEE. I'm following the example shown here: https://cran.rproject.org/web/packages/PROMETHEE/vignettes/PROMETHEE_vignette.pdf
I'm using my own data. After using the code for evaluation, I get this error
Error in PROMETHEE(dataset, PreferenceF, PreferenceT, IndifferenceT, Weights, :
dataset: Data set not numeric at column: 1
To what column this error message is refering to and why?
#get the data
dataset <- structure(list(PV = c(4, 2, 1, 2), LC = c(1.5, 35, 7, 4.3), log_Kow = c(2.6,
1.4, 1.9, 2.5), BD = c(0.2, 0, 0.1, 0.5)), row.names = c(NA,
-4L), class = c("tbl_df", "tbl", "data.frame"))
#setting the preference functions
PreferenceF <- structure(list(PV = c("Gaussian", "Gaussian", "Gaussian", "Gaussian"
), LC = c("Linear", "Linear", "Linear", "Linear"), log_Kow = c("V-shape",
"V-shape", "V-shape", "V-shape"), BD = c("Level", "Level", "Level",
"Level")), class = "data.frame", row.names = c(NA, -4L))
#next, five steps of input
PreferenceT <- structure(list(PV = c(2L, 2L, 2L, 2L), LC = c(50000L, 50000L,
50000L, 50000L), log_Kow = c(2L, 2L, 2L, 2L), BD = c(5L, 5L,
5L, 5L)), class = "data.frame", row.names = c(NA, -4L))
IndifferenceT <- structure(list(PV = c(1L, 1L, 1L, 1L), LC = c(10000L, 10000L,
10000L, 10000L), log_Kow = c(0L, 0L, 0L, 0L), BD = c(2L, 2L,
2L, 2L)), class = "data.frame", row.names = c(NA, -4L))
Weights <- structure(list(PV = c(0.25, 0.25, 0.25, 0.25), LC = c(0.25, 0.25,
0.25, 0.25), log_Kow = c(0.25, 0.25, 0.25, 0.25), BD = c(0.25,
0.25, 0.25, 0.25)), class = "data.frame", row.names = c(NA, -4L
))
Min_Max <- structure(list(PV = c("min", "min", "min", "min"), LC = c("min",
"min", "min", "min"), log_Kow = c("max", "max", "max", "max"),
BD = c("min", "min", "min", "min")), class = "data.frame", row.names = c(NA,
-4L))
S_Gauss <- structure(list(PV = c(2L, 2L, 2L, 2L), LC = c(0L, 0L, 0L, 0L),
log_Kow = c(0L, 0L, 0L, 0L), BD = c(0L, 0L, 0L, 0L)), class = "data.frame", row.names = c(NA,
-4L))
#code for evaluation
PF=PROMETHEE(dataset,PreferenceF,PreferenceT,IndifferenceT,Weights,Min_Max,S_Gauss)