Displaying 9 results from an estimated 9 matches for "refhooks".
Did you mean:
refhook
2024 Jan 12
2
Choices to remove `srcref` (and its buddies) when serializing objects
Dear R devs,
I was digging into a package issue today when I realized R serialize function not always generate the same results on equivalent objects when users choose to run differently. For example, the following code
serialize(with(new.env(), { function(){} }), NULL, TRUE)
generates different results when I copy-paste into console vs when I use ctrl+shift+enter to source the file in RStudio.
2024 Jan 17
1
Choices to remove `srcref` (and its buddies) when serializing objects
On 1/16/24 20:16, Dipterix Wang wrote:
> Could you recommend any packages/functions that compute hash such that
> the source references and sexpinfo_struct are ignored? Basically a
> version of `serialize` that convert R objects to raw without storing
> the ancillary source reference and sexpinfo.
> I think most people would think of `digest` but that package uses
>
2024 Jan 16
2
Choices to remove `srcref` (and its buddies) when serializing objects
Could you recommend any packages/functions that compute hash such that the source references and sexpinfo_struct are ignored? Basically a version of `serialize` that convert R objects to raw without storing the ancillary source reference and sexpinfo.
I think most people would think of `digest` but that package uses `serialize` (see discussion
2012 Mar 22
1
Serializing many small objects efficiently
Hi,
sorry if this question is trivial or unclear, this is my first venture into
mixed C/R programming (I am reasonably experienced in each separately).
I am trying to write a serialization function for a format called
typedbytes, which is used as an interchange format in Hadoop circles. Since
I would need to serialize according to the internal R format many small R
objects I looked at the c
2020 Jan 29
2
Model object, when generated in a function, saves entire environment when saved
Reviving an old thread. I haven't noticed this be a problem for a while
when saving RDS's which is great. However, I noticed the problem again when
saving `qs` files (https://github.com/traversc/qs) which is an RDS
replacement with a fast serialization / compression system.
I'd like to get an idea of what change was made within R to address this
issue for `saveRDS`. My thought is that
2013 Nov 16
2
serialization for external pointers
Hello,
Are there any recipe to handle serialization / deserialization of
external pointers.
I'm thinking about something similar in spirit to the way we handle
finalization of external pointers.
Currently, if we create an external pointer, save the session, quit R,
then load the session, we get a null pointer.
One way I'm thinking of is to have an environment in the
2024 Jan 17
1
Choices to remove `srcref` (and its buddies) when serializing objects
> I think one could implement hashing on the fly without any
> serialization, similarly to how identical works, but I am not aware of
> any existing implementation
We have one in vctrs but it's not exported:
https://github.com/r-lib/vctrs/blob/main/src/hash.c
The main use is vectorised hashing:
```
# Non-vectorised
vctrs:::obj_hash(1:10)
#> [1] 1e 77 ce 48
# Vectorised
2017 Aug 23
1
How to benchmark speed of load/readRDS correctly
Hi there
Thanks for your answers. I didn't expect that this would be so complex. Honestly, I don't understand everything you wrote since I'm not an IT specialist. But I read something that reading *.rds files is faster than loading *.Rdata and I wanted to proof that for my system and R version. But thanks anyway for your time.
Cheers Raphael
> -----Urspr?ngliche Nachricht-----
2011 May 26
1
serialization of external pointers
Hello,
I'm looking for examples of how to handle serialization of external
pointers.
We use external pointers intensively in Rcpp for modules and one popular
request is to have persistence. And I guess we need to be able to
serialize/deserialize external pointers for this.
Also, module objects are all instances of reference classes, so maybe
that can be handled at the R level ?
Romain