0

I am interested in the source code of the package https://rdrr.io/cran/fclust/, particularly the functions RI.F and ARI.F, but could only find the R implementations

which are just link to the C++ code. Where is the source code of the C++ parts of a package usually available? Where in this case?

I am not sure if the package is Open Source to be honest and I am not sure if there is a place where the source code is "usually available".

Make42
  • 12,236
  • 24
  • 79
  • 155
  • 2
    https://github.com/cran/fclust/tree/master/src – rawr Mar 08 '21 at 13:39
  • @rawr: Thanks, I was not aware of that github repository! The link to the respective file is https://github.com/cran/fclust/blob/master/src/partition_comp.cpp – Make42 Mar 08 '21 at 14:46

1 Answers1

1

I explain how to do it for fclust, but instead of just providing a link, I show the path to get there in such a way that it should be reproducible for many other packages at CRAN.

When you go to https://rdrr.io/cran/fclust/ then you see the table entry "Package repository" and behind it a link called "View on CRAN". When you go there and look underneath "Downloads:" you will see a link behind "Package source:". The source code is in the ".tar.gz".

Next, you have to look into the R-code and will see that the function partition_comp is called. You can also see it listed in https://rdrr.io/cran/fclust/f/ as src/partition_comp.cpp. So go into the ".tar.gz"-file and look for that file. It will contain the C++ source code.

Make42
  • 12,236
  • 24
  • 79
  • 155