Updated information
I finally got to make souceCpp
works, but still couldn't get the source code in R.
I tried the following:
Rcpp::sourceCpp('src/vinecopulib-interface.cpp')
> try <- Rcpp::sourceCpp('src/vinecopulib-interface.cpp')
> try
$functions
[1] "pseudo_obs_cpp" "bicop_check_cpp" "bicop_select_cpp"
[4] "bicop_pdf_cpp" "bicop_cdf_cpp" "bicop_hfunc1_cpp"
[7] "bicop_hfunc2_cpp" "bicop_hinv1_cpp" "bicop_hinv2_cpp"
[10] "bicop_sim_cpp" "bicop_loglik_cpp" "bicop_par_to_tau_cpp"
[13] "bicop_tau_to_par_cpp" "rvine_structure_cpp" "rvine_structure_check_cpp"
[16] "rvine_structure_sim_cpp" "rvine_matrix_check_cpp" "vinecop_check_cpp"
[19] "vinecop_inverse_rosenblatt_cpp" "vinecop_rosenblatt_cpp" "vinecop_sim_cpp"
[22] "vinecop_pdf_cpp" "vinecop_cdf_cpp" "vinecop_loglik_cpp"
[25] "vinecop_mbicv_cpp" "vinecop_select_cpp" "fit_margins_cpp"
Then, I tried to get, try$functions[26]
but did not return me the function in R code.
I have installed the
R
package. I tried to convert some files from src
into R
language. I do the following steps:
Open the package in the
R
consoleOpen one file of the
src
folder as aC++
file.Then, use
soucreCpp(filename.cpp)
but got the following:
> Rcpp::sourceCpp('src/vinecopulib-interface.cpp')
In file included from vinecopulib-interface.cpp:1:
In file included from /Users/fadhahalanazi/Downloads/rvinecopulib-master/src/../inst/include/vinecopulib-wrappers.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/RcppEigenForward.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:540:[![as shown here][1]][1]
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:14:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop
^