(Sorry for not linking to your message; I accidentally deleted the
original copy of your message.)
> zz = textConnection('tempConnection', 'wb')
> saveRDS(c("a", "b", "c"), zz, ascii = TRUE)
> serialized_obj = paste(textConnectionValue(zz), collapse='\n')
Error in gzcon(file) : 'read' not enabled for this connection
has one problem: textConnectionValue(zz) may not be the complete text
because zz hasn't been closed. You should close(zz), then get the
result from the variable tempConnection.
However, this doesn't fix the problem you saw, which appears to be a bug
in readRDS or gzcon. I'll post it to the bug list.
Rfirstname.lastname@example.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.