Temporary example for testing optim replacement (KMbranch) #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Fortran code is directly translated to Rcpp. To install, follow these steps:
Remove the existing package first
remove.packages("biplotEZ")
Install from the KMbranch branch
devtools::install_github("MuViSU/biplotEZ", ref = "KMbranch")
Load and test
library(biplotEZ)
You may notice that this Rcpp-based implementation is not as fast as the original Fortran version. This is primarily due to the line-by-line translation from Fortran, which does not fully exploit Rcpp’s strengths and therefore results in non-optimal performance. Addressing this issue would require certain modifications to the algorithm, for which I would need your permission. I would be happy to discuss the possible approaches in a meeting at your convenience.
There is an additional folder (\texttt{temp}), which is described below. The files in this directory are not cleaned:
I also add a temporary folder (examples/temp/) and example to test the replacement of the FORTRAN implementation with R’s function and a .Rcpp file.
The examples in examples/temp/ contains R code following the library’s main function logic (Fortran and Rcpp). Please run them on your system for any suggestions.
A new file in src/ (.Rcpp) has been added, which is called from the example.
The example is purely for testing purposes and does not affect the library, as examples/temp/ is included in .Rbuildignore.
Note: This is not intended for merging yet; the example can be removed when the branch is eventually merged.