dotsapply(HilbertVisGUI)
dotsapply()所属R语言包:HilbertVisGUI
List apply for '...' arguments
列出申请......“参数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A kludge to get around a certain problem in using lapply
一个杂牌来解决一定的问题,在使用lapply
用法----------Usage----------
dotsapply( fun, ... )
参数----------Arguments----------
参数:fun
A function that takes one argument
它有一个参数的函数
参数:...
Arguments to which the function should be applied
应适用于该函数的参数
Details
详情----------Details----------
"dotsapply(fun,...)" gives the same result as lapply( list(...), fun). However, the construction with "list", when used for variables enumerated explicitely, will result in their duplication.
“dotsapply(fun,...)给lapply( list(...), fun)相同的结果。然而,建设“list”时,用于枚举明确地变量,将导致他们的重复。
Assume, for example, that you have three very large vectors a, b, and c, whose lengths you wish to know. If your write "lapply( list(a,b,c), length )", R will duplicate all three vectors in memory when constructing the list, which results in unnecessary use of memory. The alternative "dotsapply( length, a, b, c )" avoids this. Of course, you could also write "list( length(a), length(b), length(c) )", which neither causes duplication.
假设,例如,你有三个非常大的向量a,b,的c,你想知道其长度。如果你写“lapply( list(a,b,c), length )”R将在内存中的重复建设名单时,所有三个向量,从而导致不必要的内存使用。另类“dotsapply( length, a, b, c )”避免这种。当然,你也可以写“list( length(a), length(b), length(c) )”,这既不是导致重复。
This last possibility is, however, not an option, if, instead of "a,b,c", you have ellipsed function arguments, i.e. literally "...". In this special case, dotsapply comes in handy, and as this case arose in hilbertDisplay, I implemented dotsapply as a kludge and export it from the package just in case somebody ahs use for it.
然而,这最后的可能性不是一种选择,如果,而不是“a,b,c”,你已经ellipsed函数的参数,即字面意思是“...”。在这种特殊情况下,dotsapply就派上用场了,这种情况出现在hilbertDisplay,我实现了dotsapply作为一个杂牌和出口包,以防万一有人AHS使用。
值----------Value----------
A list of function values
函数值列表
作者(S)----------Author(s)----------
Simon Anders, EMBL-EBI, <a href="mailto:sanders@fs.tum.de">sanders@fs.tum.de</a>
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|