SCM

SCM Repository

[tm] Diff of /pkg/R/textdoccol.R
ViewVC logotype

Diff of /pkg/R/textdoccol.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 727, Sun Apr 8 19:36:41 2007 UTC revision 728, Sun Apr 8 23:23:29 2007 UTC
# Line 140  Line 140 
140                # Note that text corpora are automatically loaded into memory via \code{[[}                # Note that text corpora are automatically loaded into memory via \code{[[}
141                if (DBControl(object)[["useDb"]]) {                if (DBControl(object)[["useDb"]]) {
142                    db <- dbInit(DBControl(object)[["dbName"]], DBControl(object)[["dbType"]])                    db <- dbInit(DBControl(object)[["dbName"]], DBControl(object)[["dbType"]])
143                    new <- lapply(object, FUN, ..., DMetaData = DMetaData(object))                    i <- 1
144                    ids <- lapply(object, ID)                    for (id in unlist(object)) {
145                    # Avoidance of explicit loop is probably more efficient                        db[[id]] <- FUN(object[[i]], ..., DMetaData = DMetaData(object))
146                    for (i in length(new)) {                        i <- i + 1
                       db[[ids[i]]] <- new[[i]]  
147                    }                    }
148                      #new <- lapply(object, FUN, ..., DMetaData = DMetaData(object))
149                      #ids <- lapply(object, ID)
150                      # Avoidance of explicit loop is probably more efficient
151                      #for (i in length(new)) {
152                      #    db[[ids[i]]] <- new[[i]]
153                      #}
154                    dbDisconnect(db)                    dbDisconnect(db)
155                }                }
156                else                else

Legend:
Removed from v.727  
changed lines
  Added in v.728

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge