[Rd] using Paraview "in-situ" with R?
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Tue Jan 9 15:35:29 CET 2024
В Tue, 9 Jan 2024 14:20:17 +0000
Mike Marchywka <marchywka using hotmail.com> пишет:
> it seems like an excellent tool to interface to R allowing
> visualization without a bunch of temp files or
>
> Is anyone aware of anyone doing this interface or reasons its a
> boondoggle?
This sounds like it's better suited for r-package-devel using r-project.org,
not R-devel itself.
In theory, nothing should prevent you from writing C++ code interfacing
with ParaView (via its "adios" streaming library) and with R. The Rcpp
package will likely help you bring the semantics of the two languages
closer together. (Memory allocation and error handling are the two
major topics where R and C++ especially disagree.)
On the R side, make an object with reference semantics (i.e. an
external pointer) and use callbacks to update it with new information
while R code is running. On the R extension side, translate these
callbacks into necessary calls to the adios library to transfer the
data to ParaView.
For more informaion, see Writing R Extensions at
<https://cran.r-project.org/doc/manuals/R-exts.html> and Rcpp
documentation at <https://CRAN.R-project.org/package=Rcpp>.
--
Best regards,
Ivan
More information about the R-devel
mailing list