I have a data frame that looks like this
position=c("24,201", "8,915", "45,877:1","251,603")
evindence=c("RA", "RA","RA","RA")
test = data.frame(evindence,position)
evindence position
1 RA 24,201
2 RA 8,915
3 RA 45,877:1
4 RA 251,603
I would like to use stringr or other tidyr applications to replace "," = "." and then create a new column when there is a string like ":".
I would like my dataset to look like this:
evindence position insertion
1 RA 24201 NA
2 RA 8915 NA
3 RA 45877 1
4 RA 251603 NA
Any help or direction are appreciated