oss_src/serialization/rcpp_serialization.hpp
inline std::string serializeToStr(SEXP object) {
    // using R's C API, all SEXP objects will be serialized into a raw vector
    Rcpp::RawVector val = serializeToRaw(object);

    // convert R raw vector into a std::string
    std::string res;

    for (size_t i = 0; i < val.size(); i++) {
        res = res + std::to_string(int(val[i])) + "\t";
    }

    return res;
}
// the serialization function from SEXP to std::string
the serialization function from SEXP to std::string
the serialization function from SEXP to std :: string
inline std::string serializeToStr(SEXP object) {
    Rcpp::RawVector val = serializeToRaw(object);
    std::string res;
    for (size_t i = 0; i < val.size(); i++) {
        res = res + std::to_string(int(val[i])) + "\t";
    }
    return res;
}
inline std :: string serializeToStr ( SEXP object ) { Rcpp :: RawVector val = serializeToRaw ( object ) ; std :: string res ; for ( size_t i = 0 ; i < val . size ( ) ; i ++ ) { res = res + std :: to_string ( int ( val [ i ] ) ) + " \t " ; } return res ; }
the serialization function from SEXP to std::string
the serialization function from SEXP to std :: string
// using R's C API, all SEXP objects will be serialized into a raw vector // convert R raw vector into a std::string