I want to replace the 6th column of the ped dataframe with the Phenotype column from bipolar_ctl dataframe.
ped
Phenotype
bipolar_ctl
My attempt:
dplyr::mutate_at(ped, vars(-one_of("bipolar_ctl$Phenotype")))
Using base R,
R
ped[,6] = bipolar_ctl$Phenotype