You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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?
The text was updated successfully, but these errors were encountered:
Sorry for the delay. This is interesting. What version of datadr and R do you have? I don't get an error, but a row of all NA (which isn't right either - it should be an empty data frame).
The other test case you provide, where you provide a vector of logicals, doesn't work in this setting because a ddf doesn't keep track of the row ordering of the original data frame.
The intended usage of drSubset() is a bit limiting because it's intended to be used when you want to grab an in-memory data frame subset of a ddf, which could potentially be very large.
If you want to filter out records but still have a ddf, you can simply add a transformation function to a ddf that does the filtering (using whatever mechanism you'd like - subset, dplyr, etc.).
Hi,
I am trying to extract a subset of a ddf(local disk based).
The last line throws an error:
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?The text was updated successfully, but these errors were encountered: