[Rcpp-devel] Doubt about best pratices
Roberto Spadim
roberto at spadim.com.br
Sun May 1 20:17:11 CEST 2022
Very nice, thanks Dirk and Jeff
Well i think i will accept a RObject and if it's a DataFrame I convert
to Matrix and it continue working
I will benchmark the differences to understand it better.
---
Other two doubt and I think that's all:
1) If dataset is too big (size is bigger than ram) is there a standard
lib to use it, or should i consider that using dataframe/matrix types
will work?
2) I never used GPU in R, I used keras with python, dash and others
python libs that handle bigdata / gpu math. Is there something related
to GPU and RCpp/R? Any standard to consider?
Thanks again!
Em dom., 1 de mai. de 2022 às 03:05, Dirk Eddelbuettel
<edd at debian.org> escreveu:
>
>
> This is not a well-posed Rcpp question as
>
> - matrix and data.frame are _fundamentally_ two different data types
>
> - matrix being _one_ and only one storage type, or class, stored
> as one vector with dimension attribute of size two for rows and cols;
> this makes it _efficient_ and you will see a matrix type used quite a bit
> in internal R functions
>
> - data.frame being a special case of the catch-all type list with each
> column being of same length but possibly different types -- and for that
> reason we do not have too much tooling for this 'list of vectors' in Rcpp
> besides the basics
>
> So in short you may want to work out first what you want you algorithm to be
> and maybe use higher-level converters in R to accomodate.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
--
Roberto Spadim
SPAEmpresarial - Software ERP/Scada
Eng. Automação e Controle, Eng. Financeira
More information about the Rcpp-devel
mailing list