Skip to contents

Inverse of irw_long2resp(): converts a wide response data frame/matrix into long format with columns id, item, resp.

Usage

irw_resp2long(x, id = TRUE)

Arguments

x

A wide response object (data.frame or matrix). If produced by irw_long2resp(), it will typically include an id column.

id

Logical. If TRUE (default), expects an id column in x. If FALSE, creates id = 1:nrow(x) and treats all columns as item columns.

Value

A data.frame with columns id, item, resp.