Skip to content

Automatic index column generation for dcast? #1205

Closed

Description

@arunsrinivasan

http://stackoverflow.com/a/31194461/559784

 setDT(df1)[, ind:= 1:.N, .(zip, acs.pop, napps, pperct)]
 dcast(df1, zip+acs.pop + napps+pperct~ind, value.var=c('zgrp', 'perc'))

This kind of operation is required quite frequently before dcast (AFAICT from Q on SO).

Activity

  1. arunsrinivasan commented on Sep 22, 2015

    @arunsrinivasan
    MemberAuthor

    dup of #1353.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions