I am looking to merge across two columns which contain different data. That is where it is empty in one column it is not empty in another, essentially data collected from two different conditions in a study, in order to run analysis I need to combine this data and run t-tests. I was wondering how to combine numerical columns with dplyr -
check <- check %>%
mutate(cat = rowSums(.[1:2]))
> dput(head(check))
structure(list(t7_1_ExpA_Intro1 = c(NA_integer_, NA_integer_,
NA_integer_, NA_integer_, NA_integer_, NA_integer_), t7_1_ExpB_Intro1 = c(NA,
NA, NA, 3L, NA, NA), t7_1_ExpA_DV = c(NA_integer_, NA_integer_,
NA_integer_, NA_integer_, NA_integer_, NA_integer_), t7_1_ExpB_DV = c(NA,
NA, NA, 3L, NA, NA), cat = c(NA_integer_, NA_integer_, NA_integer_,
NA_integer_, NA_integer_, NA_integer_)), .Names = c("t7_1_ExpA_Intro1",
"t7_1_ExpB_Intro1", "t7_1_ExpA_DV", "t7_1_ExpB_DV", "cat"), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))