Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:38:57+00:00 2026-06-03T20:38:57+00:00

Hoping that someone could post an example of a custom function which acts similar

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:38:58+00:00Added an answer on June 3, 2026 at 8:38 pm

    A function similar to plyr:::. is plyr:::.:

    plyr:::.
    function (..., .env = parent.frame()) 
    {
        structure(as.list(match.call()[-1]), env = .env, class = "quoted")
    }
    <environment: namespace:plyr>
    

    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:

    with(iris, .(Sepal.Length, Species))
    List of 2
     $ Sepal.Length: symbol Sepal.Length
     $ Species     : symbol Species
     - attr(*, "env")=<environment: 0x2b33598> 
     - attr(*, "class")= chr "quoted"
    

    What you do with this object next, depends on your purpose. Several methods exist for working with this class:

    methods(class="quoted")
    [1] as.quoted.quoted* c.quoted*         names.quoted*     print.quoted*     [.quoted*        
    
       Non-visible functions are asterisked
    

    So, if you’re looking for a function like .(), perhaps you can simply use .()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have never really done this before so i was hoping that someone could
I've written a function that takes a data.frame which represent intervals of data which
I was just hoping that someone could point me to a reference that defines
Perhaps I'm having a Post-Ballmer-Peak Moment . I'm hoping that someone can help point
I was hoping someone might help with a function that given two parameters: @param
I have no idea what's going on here and was hoping someone could help,
first post here, hoping someone could perhaps shed some light on an issue I've
In my document I have this script: $.ajax({ type:POST,url:ajax.php,data:data, success: function() { //onsuccess },
I was hoping that someone could clarify exactly what is meant by undefined behaviour
I am somewhat new to java and was hoping that someone could help me.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.