jeudi 21 octobre 2021

Creating a new column using existing categorical data

I have two columns with categorical data. One of which is called "Variety" and the other is called "Pollen_donor". I want to create a new column that designates each row as either "self-cross" or "out-cross" based on if the variety and the pollen donor are the same or different. I've been advised to try combining the mutate function with ifelse() but have been having issues.

enter image description here

Aucun commentaire:

Enregistrer un commentaire