Skip to content

[R-Forge #2110] Add . and .. symbol prefixes and inherits=FALSE for strict scope #633

Description

@arunsrinivasan

Submitted by: Matt Dowle; Assigned to: Nobody; R-Forge link

inherits=FALSE would allow user to specify that j should use column names only, and if column name doesn't exist that should be error rather than possibly finding a match in calling scope.

..() is for the sub-join examples where the join goes in j and you want to refer to the columns in i not .SD. Something like that.

Activity

  1. changed the title [-][R-Forge #2110] Add .(), ..(), inherits=FALSE and maybe . and .. prefixes to symbols[/-] [+][R-Forge #2110] Add . and .. symbol prefixes and inherits=FALSE for strict scope[/+] on Jun 17, 2014
  2. added this to the v1.9.4 milestone on Jul 31, 2014
  3. modified the milestones: v1.9.6, v1.9.4 on Sep 27, 2014
  4. modified the milestones: v1.9.6, v1.9.8 on Oct 10, 2014
  5. mattdowle commented on Dec 3, 2015

    @mattdowle
    Member
  6. modified the milestones: , v1.9.8 on Mar 20, 2016
  7. added a commit that references this issue on Dec 8, 2016
  8. JoshOBrien commented on Jan 19, 2017

    @JoshOBrien
    Contributor

    Once version 10.2 is released (if not before), we should revisit this answer to remove the mention of datatable.WhenJisSymbolThenCallingScope=TRUE. (As always, any of you should feel free to edit as you like).

  9. RuinedSubmartingale commented on Feb 11, 2017

    @RuinedSubmartingale

    It'd be nice to be able to use this feature and the ! notation for excluding columns in tandem.

    dt <- data.table(x = 1:10, y = rnorm(10), z = runif(10))
    cols <- c('y', 'z')
    dt[, !..cols] # should return col x
  10. ctbrown commented on Jun 20, 2017

    @ctbrown

    I followed the SO issue here looking for this feature. Since, it is still experimental may I recommend that the syntax be changed from ..A to ..$A where .. is a reference to the parent.frame. I believe this is more R-like, does the same thing and conforms to user expectations. It seems that this can be simply(?) done with:

    makeActiveBinding('..', parent.frame)
    
  11. arunsrinivasan commented on Jun 29, 2017

    @arunsrinivasan
    MemberAuthor

    Refer to #2186 for name mention under NEWS.

  12. franknarf1 commented on Jul 29, 2017

    @franknarf1
    Contributor
  13. removed this from the milestone on May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions