Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subset syntax #5

Closed
zmughal opened this issue Jul 9, 2014 · 2 comments
Closed

subset syntax #5

zmughal opened this issue Jul 9, 2014 · 2 comments

Comments

@zmughal
Copy link
Member

zmughal commented Jul 9, 2014

use localised variables like List::Utils:

subset $my_data { $SecondColName > 15 }

http://irclog.perlgeek.de/pdl/2014-07-09#i_8997055

# is equivalent to
$g = pdl q[ [1, 20], [2, 13], [3, 27]  ]; $col = $g->slice('1,'); $g->dice(X, which( $col > 15 ))
$g->whereND($g(1)>15)
@zmughal
Copy link
Member Author

zmughal commented Aug 25, 2014

This was not such a good idea because it conflicts with use strict. I chose to use a helper that sets $_ so that I can do $_->('ColumnName').

@zmughal
Copy link
Member Author

zmughal commented Feb 14, 2015

Subset syntax is supported by using the Rlike role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant