similar to: C versions of serialize/unserialize in packages

Displaying 20 results from an estimated 600 matches similar to: "C versions of serialize/unserialize in packages"

2011 Dec 06
1
unserialize and eager execution
Hi, While debugging a network server I'm developing I noticed something unusual - call to unserialize() resulted in an error about loading a namespace. I was a bit taken back by this - why should unserializing an object cause a namespace lookup? Are there any other side-effects of unserialize() that I should be cautious about? I've been digging through the R_Unserialize() call, I
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
2007 Aug 23
3
RData File Specification?
Hi, I am developing a tool for converting a large data frame stored in an uncompressed binary (XDR) RData file to a delimited text file. The data frame is too large to load() and extract rows from on a typical PC. I'm looking to parse through the file and extract individual entries without loading the whole thing into memory. In terms of some C source functions, instead of doing
2011 Sep 28
1
serialize/unserialize vector improvement
Hi folks, I've attached a patch to the svn trunk that improves the performance of the serialize/unserialize interface for vector types. The current implementation: a) invokes the R_XDREncode operation for each element of the vector type, and b) uses a switch statement to determine the stream type for each element of the vector type. I've added R_XDREncodeVector/R_XDRDecodeVector functions
2008 Nov 30
1
Rserve and creating a list of lists
Hello, I have some code which generates lattice objects. The function recieves serialized forms of the lattice objects which it then unserializes and then adds to an ArrayList<REXP>. REXPRaw rser = new REXPRaw( target ); //target contains the raw serialized forms of lattice objects rconn.assign("temp",rser); REXP ret =
2018 Jun 21
1
DOCUMENTATION(?): parallel::mcparallel() gives various types of "Error in unserialize(r) : ..." errors if value is of type raw
I stumbled upon the following: f <- parallel::mcparallel(raw(0L)) parallel::mccollect(f) # $`77083` # NULL but f <- parallel::mcparallel(raw(1L)) parallel::mccollect(f) # Error in unserialize(r) : read error traceback() # 2: unserialize(r) # 1: parallel::mccollect(f) (restarting because the above appears to corrupt the R session) f <- parallel::mcparallel(raw(2L))
2020 Oct 29
2
Something is wrong with the unserialize function
Hi all, I am not able to export an ALTREP object when `gctorture` is on in the worker. The package simplemmap can be used to reproduce the problem. See the example below ``` ## Create a temporary file filePath <- tempfile() con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) library(parallel) cl <- makeCluster(1) x <- mmap(filePath,
2005 Dec 12
2
Can you unserialize an object from the db?
I don''t even know if this is possible. I want to use an object as an attribute for one of my classes. I can save it to the db fine, looks like...but I need to be able to use it after I pull the object from the db. Right now the attribute is just a String, but I need it to be a Runt::Intersect object. Does anyone know how I can unserialize the attribute so I can use it as an object?
2020 Oct 29
2
[External] Something is wrong with the unserialize function
This Index: src/main/altrep.c =================================================================== --- src/main/altrep.c (revision 79385) +++ src/main/altrep.c (working copy) @@ -275,10 +275,11 @@ SEXP psym = ALTREP_SERIALIZED_CLASS_PKGSYM(info); SEXP class = LookupClass(csym, psym); if (class == NULL) { - SEXP pname = ScalarString(PRINTNAME(psym)); + SEXP pname =
2013 Jul 15
2
suppress startup messages from default packages
Hi all, several packages print messages during loading. How do I avoid to see them when the packages are in the defaultPackages? Here is an example. With this in ~/.Rprofile ,----[ ~/.Rprofile ] | old <- getOption("defaultPackages") | options(defaultPackages = c(old, "filehash")) | rm(old) `---- I get as last line when starting R: ,---- | filehash: Simple key-value
2020 Oct 29
0
[External] Something is wrong with the unserialize function
Thanks for the report. Will look into it when I get a chance unless someone else gets there first. A simpler reprex: ## create and serialize a memmory-mapped file object filePath <- "x.dat" con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) x <- mmap(filePath, "double") saveRDS(x, file = "x.Rds") ## in a
2020 Oct 29
0
[External] Something is wrong with the unserialize function
I found that also; fixed in r79386 in the trunk. Will port to R-patched shortly. Best, luke On Thu, 29 Oct 2020, Martin Morgan wrote: > This > > Index: src/main/altrep.c > =================================================================== > --- src/main/altrep.c (revision 79385) > +++ src/main/altrep.c (working copy) > @@ -275,10 +275,11 @@ > SEXP psym =
2018 Nov 07
2
error unserializing ascii format (v2 or v3)
I ran into an interesting error unserializing a file created with ascii=TRUE: R 3.5.1 (Windows or Linux): > unserialize(serialize(list(raw=as.raw(c(39,41))), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw = as.raw(c(39, 41))), NULL, version = 2, : ReadItem: unknown type 29, perhaps written by later version of R The same error happens when the
2009 Mar 15
1
What is the best package for large data cleaning (not statistical analysis)?
Dear R helpers: I am a newbie to R and have a question related to cleaning large data frames in R. So far, I have been using SAS for data cleaning because my data sets are relatively large (handling multiple files, each could be as large as 5-10 G). I am not a fan of SAS at all and am eager to move data cleaning tasks into R completely. Seems to me, there are 3 options. Using SQL, ff or
2012 Apr 27
1
TikzDevice
Dear R'ers, I have trouble installing tikzDevice in Ubuntu.  When I use install.packages("tikzDevice"), it gives error message: ERROR: dependency ‘filehash’ is not available for package ‘tikzDevice’ * removing ‘/usr/local/lib/R/site-library/tikzDevice’ Then I tried filehash installation, I get the message: "package ‘filehash’ is not available (for R version 2.13.1)"
2011 Jan 02
1
filehash for big data
Hi all, I am trying to use the filehash library to analyze a 5M by 20 matrix with both double and string data types. After consulting a few tutorials online, it seems as though one needs to first read the data into R; then create an R object; and then assign that object a location in my computer via filehash. It seems like the benefit of this is minimizing memory allocation when running
2008 Mar 15
1
filehash
Hello, I'm using filehash on the windows XP and it has been working fine with the newest R version 2.6.2. However, on the windows vista, when I ran the same code, I got the following error: > dbCreate("simdb") #create simdb database [1] TRUE > db<-dbInit("simdb") #initiate an object of database Error in sprintf(gettext(fmt, domain = domain), ...) : object
2008 Mar 08
1
Error message while trying to update packages: Error in gzfile(file, mode) : unable to open connection
Hello, I have just installed v 2.6.2 on a new computer running Windows XP and tried to perform 'update packages' via the menu option on the R console. Any advice on the following problem is much appreciated. Bob Below are the warning and error messages received. A search of the hard drive does not reveal any file including "RtmpgMMu03/libloc" . >
2011 Sep 23
2
tikzDevice install problem
Hi everybody! I'm trying to install the tikzDevice package, and I keep on getting the > ERROR: dependency ‘filehash’ is not available for package ‘tikzDevice’ I tried install.packages('filehash') and I get > package ‘filehash’ is not available Does anybody have the same problem or any hint? thank youhelena [[alternative HTML version deleted]]
2013 Jul 15
2
Serialize data.frame to database
Dear R-Users, I need a very fast and reliable database solution so I try to serialize a data.frame (to binary data) and to store this data to an SQLite database. This is what I tried to do: library(RSQLite) con <- dbDriver("SQLite") db <- dbConnect(con, "test") dbSendQuery(db, 'CREATE TABLE frames("simID" INT, "data" BLOB)') data.bin <-