From 0bc8ef60b0bd8b3c7d7feef3b5878851e7c29993 Mon Sep 17 00:00:00 2001 From: saviranadela <32274458+saviranadela@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:50:11 -0800 Subject: [PATCH] FPAS_Silva_2022 --- data/FPAS_Silva_2022.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/FPAS_Silva_2022.R diff --git a/data/FPAS_Silva_2022.R b/data/FPAS_Silva_2022.R new file mode 100644 index 0000000..b5cb3e2 --- /dev/null +++ b/data/FPAS_Silva_2022.R @@ -0,0 +1,15 @@ +library(dplyr) +library(tidyr) + +df <- read.csv("DATA_FPAS_2022.csv") + +df <- df %>% + select(record_id, fpas_1:fpas_18) %>% + rename(id = record_id) + +df <- df %>% + pivot_longer(fpas_1:fpas_18, + names_to = "item", + values_to = "resp") + +write.csv(df, "FPAS_Silva_2022.csv", row.names=FALSE)