Skip to content

Transpose coords #54

@xrobin

Description

@xrobin

Coords returns a matrix with thresholds in columns, and the measurement in rows.

This has always been a bit weird but is becoming problematic with pipelines where a data.frame in transposed form would be better suited.

Expected behavior

> library(dplyr)
> roc(aSAH, outcome, wfns) %>% coords()
Setting levels: control = Good, case = Poor
Setting direction: controls < cases
                threshold specificity sensitivity
      -Inf   0.0000000   1.0000000
       1.5   0.5138889   0.9512195
       2.5   0.7916667   0.6585366
       3.5   0.8333333   0.6341463
       4.5   0.9444444   0.4390244
       Inf   1.0000000   0.0000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-changeThe issue describes a change in the API visible to the user

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions