第3章有一段代码看不懂
| get.msg <- function(path) | |
| { | |
| con <- file(path, open = "rt", encoding = "latin1") | |
| text <- readLines(con) | |
| # The message always begins after the first full line break | |
| msg <- text[seq(which(text == "")[1] + 1, length(text), 1)] | |
| close(con) | |
| return(paste(msg, collapse = "\n")) | |
| } |
其中msg <- text[seq(which(text == "")[1] + 1, length(text), 1
的“seq(which(text == "")[1] + 1, length(text), 1)”是怎么个思路啊?
有没有大仙指导一下?


雷达卡





京公网安备 11010802022788号







