作为函数R的一部分返回
[1] Provided that the data is normally: time series estimate = 5478908.4 with confidence interval (4779426,6282453.9)
我只需要将数字放入带有像
这样的列的矩阵中5478908 4779426 6282453
有没有办法用输出做到这一点?
答案 0 :(得分:2)
通过消极的观察。
> x <- 'Provided that the data is normally: time series estimate = 5478908.4 with confidence interval (4779426,6282453.9)'
> regmatches(x, gregexpr("(?<!\\d\\.)\\d+", x, perl=T))[[1]]
[1] "5478908" "4779426" "6282453"