adding multiple ranges of values from a column in the ifelse statement in R
I am dealing with genomic data and I have columns on nucleotide position
and its conservation score (in a dataframe). I have data regarding which
range of nucleotide positions are introns and which are exons. I want to
create a third column and be able to specify which regions are introns (as
"INTRON") and which are exons (as "EXON").
As an example suppose in nucleotide positions 1-70000, I want to specify
10000-10200, 17800-21000, 43000-54000 as introns and remaining as exons in
another column (hypothetical data). Is there a way of specifying multiple
ranges of values from a column in the ifelse function, as that would more
or less solve my problem. Is there a better way of doing it ?
No comments:
Post a Comment