>> PL/R is able to pull vectors in from R, though RPostgreSQL cannot pulls >> arrays from PostgreSQL as vectors (though it would be great to have this >> feature). >> > > I've forgotten how DBI works, but an array should just come through in text > form and you can parse it how ever you want on the R side. You can also > send an array by converting it to a string of the appropriate format. > > rpg has a 'format_for_send' method that you can dispatch on any type to > convert it to something PostgreSQL can read. I'm working on something for > formatting strings returned from the server.
I've started thinking about a general interface for DBI to do this too. It's particularly important for SQLite since it has such limited type information. Ian, if you'd like RPostgres (https://github.com/rstats-db/RPostgres) to support arrays natively, please file an issue describing your use case and providing a reproducible example that creates a table with array data. Hadley -- http://had.co.nz/ _______________________________________________ R-sig-DB mailing list -- R Special Interest Group R-sig-DB@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-db