我有许多具有这种数据结构的输出文件:中位数(低,高),我想将所有数字分成它们自己的列,但由于括号和括号内的逗号分隔数字,我遇到了困难。
library(data.table)
# Data structure = median (low, high)
output <- c("9540000 (0,11140000)",
"8.81329 (0,8.81329)",
"27080000 (0,45290000)",
"23.4947 (0,63.2807)")
desired_out <- data.table(median = c(9540000, 8.81329, 27080000, 23.4947),
low = c(0, 0, 0, 0),
high = c(11140000, 8.81329, 45290000, 63.2807))
任何帮助将不胜感激...