> On Jan 4, 2016, at 11:17 PM, Lietz, Haiko wrote:
>
> hi all,
>
> when dputting a list of sparse matrices (Matrix package), the output does not
> contain the data but the information that the list contains sparse matrices.
>
> M <- sparseMatrix(i = c(2, 1), j = c(1, 2), x = c(1, 1))
>
> dput(M) ... works.
>
> dput(list(M, M)) ... does not work.
>
> how can I dput a list of sparse matrices?
> MM <- list(M,M)
> dput(MM)
list(,
)
No problem.
I do get an error (clarifying the "did not work" statement), as (perhaps) did
you?
> dput(M,M)
Error in cat("new(\"", clx, "\"\n", file = file, sep = "") :
invalid connection
Perhaps the `dput` function was not configured to handle two S4 objects in a
list?
> [[alternative HTML version deleted]]
Please do better next time.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius
Alameda, CA, USA
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.