wideToLong: Convert Dataframe from Wide to Long

View source: R/wideToLong.R

wideToLongR Documentation

Convert Dataframe from Wide to Long

Description

This function converts a data frame from wide format to long.

Usage

wideToLong(data, colSelections)

Arguments

data

This is the data source to be converted

colSelections

These are the columns (references by column number) that contain the values

Examples

library(dplyr)
mtcars2 <- mtcars %>% mutate(Car = row.names(mtcars)) %>% select(Car,mpg,cyl,disp)
dat <- wideToLong(mtcars2,c(2:4))

jsdeherrera/shinyBoots documentation built on March 9, 2024, 3:03 a.m.