Below, I'm trying to make my data into long-form but as long as id
variable is present in my data, it won't convert to long-form?
Is there a way I can keep id
variable and make my data long-form?
library(tidyverse)
data <- read_csv('https://raw.githubusercontent.com/rnorouzian/e/master/surv.csv')
data %>%
pivot_longer(cols = everything())
# Error: Internal error: Trace data is not square.