标签: r sapply strsplit
无法理解此代码中对[[1]]的需要。删除它会显示错误。
first_and_last <- function(x){letter <- strsplit(x, split = "")[[1] return(c(first = min(letter), last = max(letter)))}
错误说:min(字母)中的错误:参数的'typr'(列表)无效