rowwise %>% mean
Series: IDHTG
When you have data from a survey, the responses for each item are most often listed in different variables. Generally you have to average across the items to get a mean value for that scale for each participant. But dealing with calculations across rows is sometimes difficult in R. load packages + make some data library(tidyverse) pID <- c("p1", "p2", "p3", "p4", "p5", "p6") item1 = sample(1:7, 6, replace=T) item2 = sample(1:7, 6, replace=T) item3 = sample(1:7, 6, replace=T) item4 = sample(1:7, 6, replace=T) item5 = sample(1:7, 6, replace=T) survey <- data.