Hi,

I am working with a very large dataset, and am using the 'filehash' package
to manage such a large file.

While I have no problem accessing objects that I load into a database, I was
hoping there is a better way to append to objects already in the database.

The only way I know now to append to an object, basically requires rewriting
the entire object.

Sample code:  =================================================

# Setting up the database
library(filehash)
A <- data.frame(a=c("abcde", "fghij", "klmno"), stringsAsFactors=FALSE)
dumpDF( A, dbName="myTestDB")
envTest <- db2env(db="myTestDB")

ls(envTest)
with(envTest, a)

# Appending to object a, but basically rewriting it...
envTest$a <- c(envTest$a, "HELLO", "GOODBYE")
with(envTest, a)

If anyone has a suggestion on how to append to an object without completely
rewriting it, I would really appreciate it.  Because in my actual
implementation, a is a vector of class character with ~3.5 million
elements... writing it (and rewriting it) takes quite a bit of time.

For reference, I am using a Windows Vista machine with:
R.version.string
[1] "R version 2.8.0 (2008-10-20)"

Thanks,
Brigid

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to