Re: Is logical subsetting of an array possible ?

2016-07-14 Thread Sahil via Digitalmars-d-learn
On Thursday, 14 July 2016 at 11:01:20 UTC, Nicholas Wilson wrote: On Thursday, 14 July 2016 at 10:51:33 UTC, Nicholas Wilson wrote: I should explain this a bit more if you are totally new to D. although filter looks like a method for an array type it is not it is a function. in D function l

Re: Is logical subsetting of an array possible ?

2016-07-14 Thread Sahil via Digitalmars-d-learn
On Thursday, 14 July 2016 at 10:51:33 UTC, Nicholas Wilson wrote: On Thursday, 14 July 2016 at 10:43:12 UTC, Sahil wrote: This is with reference to documentation about use of array in D (https://dlang.org/spec/arrays.html#array-setting). easily. The function you are looking for is called 'fil

Is logical subsetting of an array possible ?

2016-07-14 Thread Sahil via Digitalmars-d-learn
This is with reference to documentation about use of array in D (https://dlang.org/spec/arrays.html#array-setting). In languages tailor-made for data mining, like R, a subset of an array (not necessarily contiguous values) can be extracted as shown below: vec //a vector or array in R c(1:len