Hoping that someone could post an example of a custom function which acts similar to “.” in plyr.
What I have is a data frame. Where I am continuously running queries such as:
sqldf("select * from event.df where Date in (select Date from condition.df where C_1 = 1 and (C_2 = 1 OR C_3 = 3)")
What I would like is to have a function which basically acts as follows:
.(C_1, C_2 + C_3)
Specifically, a vector of formulas which define the attributes I use to select my data. I can treat “+” as OR “*” as AND etc…
I tried looking at the return type for “.” from plyr but did not understand it.
A function similar to
plyr:::.isplyr:::.:This returns a list and assigns it a class “quoted”. All it does, is to match the arguments of
.()to the column names in the enclosing environment. Try it in a different context:What you do with this object next, depends on your purpose. Several methods exist for working with this class:
So, if you’re looking for a function like
.(), perhaps you can simply use.()