Apply a Function over a List or Vector Description lapplyreturns a list of the same length asX, each element of which is the result of applyingFUNto the corresponding element ofX. sapplyis a “user-friendly” v
list用法 sapply=simplify apply=unlist(lapply) 都需要数据框格式,可以与list合用,返回是矩阵 与lapply一样,但是可以输出矩阵格式 apply Apply Functions Over Array Margins对阵列行或者列使用函数 apply(X, MARGIN, FUN, ...) lapply Apply a Function over a List or Vector对列表或者向量使用函数 lapply(X,...
Apply a Function over a List or Vector 输出永远为list lapply(X, FUN,...) sapply Apply a Function over a List or Vector lapply的variance, simplify the result if possible, 输出为vector or matrix sapply(X, FUN, ..., simplify= TRUE, USE.NAMES = TRUE) apply Apply Functions Over ArrayMarg...
Apply a Function over a List or Vector 对列表或者向量使用函数 sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE) vapply Apply a Function over a List or Vector 对列表或者向量使用函数 vapply(X, FUN, FUN.VALUE, ..., USE.NAMES = TRUE) tapply Apply a Function Over a Ragged Ar...
eapply :Apply a Function Over Values in an Environment lapply :Apply a Function over a List or Vector mapply :Apply a Function to Multiple List or Vector Arguments rapply :Recursively Apply a Function to a List tapply :Apply a Function Over a Ragged Array ...
eapply Apply a Function Over Values in an Environment base::lapply Apply a Function over a List or Vector base::mapply Apply a Function to Multiple List or Vector Arguments base::rapply Recursively Apply a Function to a List base::tapply Apply a Function Over a Ragged Array [/code] 下面...
base::apply Apply Functions Over Array Margins base::by Apply a Function to a Data Frame Split by Factors base::eapply Apply a Function Over Values in an Environment base::lapply Apply a Function over a List or Vector base::mapply Apply a Function to Multiple List or Vector Arguments ...
applyApply Functions Over Array Margins对阵列行或者列使用函数apply(X, MARGIN, FUN, ...)lapplyApply a Function over a List or Vector对列表或者向量使用函数lapply(X, FUN, ...)sapplyApply a Function over a List or Vector对列表或者向
sapply() 输入为 list, vector or data.frame ,输出为 vector or matrix. sapply()与 lapply() 可以完成相同的工作,但是输出的格式不一样。 sapply(X, FUN) Arguments: -X: A vector or an object -FUN: Function applied to each element of x ...
R中的apply函数与function函数 r语言apply函数用法,R语言apply函数家族详解applyApplyFunctionsOverArrayMargins对阵列行或者列使用函数apply(X,MARGIN,FUN,…)lapplyApplyaFunctionoveraListorVector对列表或者向量使用函数lapply(X,FUN,…)sapplyApplyaFunctionoveraList