0

I'm currently working on identifying outliers in my data set using the IsolationForest method in R. The execution of the existing project on https://r-forge.r-project.org/R/?group_id=479 failed, it displays:

RTver <- read.dcf(file=system.file("DESCRIPTION", package=pkgname), fields="Version") 
Error in system.file("DESCRIPTION", package = pkgname) : object 'pkgname' not found

Thanks in advance for the help!

1 Answers1

0

You haven't specified package; pkgname is just a placeholder.

Not sure why you want to extract the version number from the Debian Control File (DCF), but for package IsolationForest the command would be (provided you have installed IsolationForest)

RTver <- read.dcf(
    file = system.file("DESCRIPTION", package = "IsolationForest"), 
    fields = "Version");
RTver;
#     Version
#[1,] "0.0-26"
Maurits Evers
  • 49,617
  • 4
  • 47
  • 68
  • but for package IsolationForest the command would be (provided you have installed IsolationForest) The problem is that i didn't know how to install the IsolationForest package. In fact, this is the first time i use R and i find many problems. I would be so grateful if you told me how to install it? – Khouloud Ben Ali Hassen Apr 02 '18 at 10:36
  • It seems that `IsolationForest` is currently not part of CRAN; to install from source you can do `install.packages("http://download.r-forge.r-project.org/src/contrib/IsolationForest_0.0-26.tar.gz", repo=NULL, type="source")`. – Maurits Evers Apr 02 '18 at 11:13
  • What didn't work? I don't see any errors. You need to be specific. – Maurits Evers Apr 02 '18 at 21:02