Skip to content

Problem in extracting a subset of a ddf #97

@talegari

Description

@talegari

Hi,

I am trying to extract a subset of a ddf(local disk based).

library("datadr")
write.table(mtcars, "mtcars.csv", sep = ",", row.names = FALSE)
lc <- localDiskConn(file.path(getwd(), "test"), autoYes = TRUE)
drRead.table("mtcars.csv"
             , header = TRUE
             , sep = ","
             , output = lc
             , rowsPerBlock = 7)
mtcars_ddf <- ddf(lc, update = TRUE)
drSubset(mtcars_ddf, gear == 2)

The last line throws an error:

* Testing 'subset' on a subset
Error in names(tmp) <- c("key", "value") : 
  'names' attribute [2] must be the same length as the vector [1]

Same error if the last line is replaced by: drSubset(mtcars_ddf, c(rep(TRUE, 10), rep(FALSE, 22)))
Is this the intended usage of drSubset or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions