[datatable-help] can one name a collection of columns by specifying just the first and the last column
Chris Neff
caneff at gmail.com
Tue Feb 10 19:39:28 CET 2015
Wow, didn't realize that worked! So there is precedent then. It just looks
funny to me, but you are right it is easily avoided. I just didn't want to
see more divergence from subset and data.frame logic, but since this
already works with subset that's fine.
On Tue Feb 10 2015 at 1:34:03 PM Arunkumar Srinivasan <aragorn168b at gmail.com>
wrote:
> Chris,
>
> But what’s the problem? You can simply not use it?
> It’s not that uncommon. `base::subset()` does this.
>
> --
> Arun
>
> On 10 Feb 2015 at 19:31:43, Chris Neff (caneff at gmail.com) wrote:
>
> I don't like this idea. It adds extra that it doesn't need to. Doing it
> with column numbers is more straightforward, and if all you have is names
> you can get numbers by doing match() or whatever and then getting the
> sequence with seq(). Having a sequence of column names is odd.
>
> On Tue Feb 10 2015 at 1:28:25 PM Arunkumar Srinivasan <
> aragorn168b at gmail.com> wrote:
>
>> Farrel,
>>
>> It could be useful. Please file an issue on the github project page.
>> Thanks.
>>
>> --
>> Arun
>>
>> On 10 Feb 2015 at 01:08:46, Farrel Buchinsky (fjbuch at gmail.com) wrote:
>>
>> So lets say one has a data.table with the following columns
>>
>> first.name, last.name, height, weight, shoe.size, eye.color,
>> hair.length, appendage.size, ear.length
>>
>> If one wanted to just include weight through hair.length one would have
>> to go something such as this
>>
>> dt[,list(weight, shoe.size, eye.color, hair.length)]
>>
>> Is there a way to do something along the lines of
>>
>> dt[,list(weight...hair.length)]
>>
>> If so, can you direct me to the documentation? If not can you build it?
>> Is it difficult? Some data.tables have many columns.
>>
>> Thanking you in anticipation.
>>
>> Farrel
>> _______________________________________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>>
>> _______________________________________________
>> datatable-help mailing list
>> datatable-help at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20150210/5742ae7c/attachment-0001.html>
More information about the datatable-help
mailing list