-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi,
I am having some troubles trying to use subset whithin a function. I need a function that receives a string as an argument to make a subset, and it works fine when the object is a data frame but fails when the object is an ffdf. Here is a minimal example:
df <- mtcars
df_ffdf <- as.ffdf(df)
df_subset <- function(df, subset_string){
subset(df, eval(parse(text = subset_string)))
}
tmp <- df_subset(df, 'mpg >= 20')
tmp2 <- df_subset(df_ffdf, 'mpg >= 20')
The error I get is object 'mpg' not found. I would appreciate any hints to solve this problem. Thanks in advance.
Best regards,
Carlos
Metadata
Metadata
Assignees
Labels
No labels