Here are some alternatives:
1) read.table Read the text in as if it were a file and then divide:
with(read.table(text = x, sep = "/"), 100 * V1 / V2)
## [1] 66.66667 83.33333 27.27273
2) eval/parse eval/parse is generally frowned upon but here is how it would work:
100 * sapply(as.list(parse(text = x)), eval)
## [1] 66.66667 83.33333 27.27273
3) strsplit
sapply(strsplit(x, "/"), function(x) { x <- as.numeric(x); 100 * x[1] / x[2]})
## [1] 66.66667 83.33333 27.27273
4) gsubfn::strapply This picks out the two strings of digits using strapply
and then converts each to numeric and divides:
library(gsubfn)
strapply(x, "(\d+)/(\d+)", ~ 100 * as.numeric(x) / as.numeric(y), simplify = TRUE)
## [1] 66.66667 83.33333 27.27273
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…