Answers for "convert ratio to numeric in r"

0

convert ratio to numeric in r

sapply(strsplit(ratio, ":"), function(x) as.numeric(x[1])/as.numeric(x[2]))
#[1] 0.4925373 0.5873016 0.7241379 0.8181818 0.8518519
Posted by: Guest on July-22-2021

Code answers related to "convert ratio to numeric in r"

Browse Popular Code Answers by Language