Skip to content

translation option #1171

@TonyNolan

Description

@TonyNolan

can we please include an option to turn a dataset 90 degrees, to so turn rows into columns and colums into rows, so statistics and graphs can be performed on ids as well as variables.

Suggested code of a DS dataset

transpose dataset

DS_t <- as.data.frame(t(DS))

move row names into a column (new IDs)

DS_t$ID <- rownames(DS_t)

reset rownames

rownames(DS_t) <- NULL

optional: reorder to have ID as first column

DS_t <- DS_t[, c(ncol(DS_t), 1:(ncol(DS_t)-1))]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions