Entering edit mode
11.0 years ago
viniciushs88
▴
50
0 down vote favorite
I would like to transform this data:
Sample Genotype Region
sample1 A Region1
sample1 B Region1
sample1 A Region1
sample2 A Region1
sample2 A Region1
sample3 A Region1
sample4 B Region1
In that format:
Sample Genotype Region
sample1 E Region1
sample2 A Region1
sample3 A Region1
sample4 B Region1
I wanna to tag excluded (E) in "Genotype" column in an unified line to samples with more than one genotype (sample1) and just unify lines to samples with genotype repeated in two lines (sample2). I have one list with many regions (Region1 - Regionx). It is possible to do in R software? Thanks a lot.