Open FabrizioSandri opened 2 years ago
also can you please add some documentation (either in the package or on the wiki) about what steps need to be done to add a new supported data type? it looks like there are four parts of the code which need to be edited? Is there any way to reduce that number, to simplify addition of new data types? I'm thinking of some R list data structure which can be read to obtain all of the info necessary.
@tdhock The deepstate_fun_create
function has changed significantly since I submitted this pull request. I just submitted another pull request with some new improvements to this function to address an issue that happens when a function takes a std::string
as an input. This pull request, I believe, may be closed.
it looks like there are four parts of the code which need to be edited? Is there any way to reduce that number, to simplify addition of new data types?
With #9 I changed the deepstate_fun_create
function, where I rearranged the code based on your suggestion(link to the conversation) to have a single table used to lookup what to do. The procedure of introducing a new supported datatype has been simplified to only two steps with this new table:
/inst/include/RcppDeepState.h
that randomly initializes this datatype Before I add the documentation, I wanted to ask you whether method is better for adding documentation within a package. Is it a good idea to include this in the package's vignette file?
A vignette is good especially if there are code examples where you want to show the output. Wiki is good otherwise. Make sure to add links from the README so people can find these docs easily.
@tdhock In the wiki, I've published a guide on how to add a new datatype to RcppDeepState. As you suggested, I included a link to the wiki in the readme file.
these wiki page docs https://github.com/FabrizioSandri/RcppDeepState/wiki/Add-a-new-datatype-to-RcppDeepState look great thanks!
With this pull request, the
Rcpp::String
datatype has been added to RcppDeepState. Now it is possible to analyze functions that take an argument of typeRcpp::String
.A detailed description of the motivation behind this pull request can be found in the Issue #10.
Fixes #10