找回密码
 注册
查看: 425|回复: 0

R语言 trifield包 ternary.apply()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 12:04:05 | 显示全部楼层 |阅读模式
ternary.apply(trifield)
ternary.apply()所属R语言包:trifield

                                         Apply a function over a ternary grid
                                         应用的三元格内的函数

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Given 1) a ternary grid and 2) a function that takes a ternary value as its first argument, this function returns a vector formed by applying the function to each point in the grid.
1)三元格和2)一个函数,它接受一个三进制值作为第一个参数,这个函数返回一个矢量,由应用功能,在网格中的每个点。


用法----------Usage----------


ternary.apply(grid, f, ...)



参数----------Arguments----------

参数:grid
A data frame with columns a, b and c specifying points in a ternary field
一个数据框的列a,b和c指定点的三元领域


参数:f
A function that accepts a length 3 vector as its first argument
作为第一个参数的函数,它接受一个长度为3的向量


参数:...
Additional arguments passed to f
额外的参数传递给f


Details

详细信息----------Details----------

Results will be concatenated into a vector; it is most useful for scalar-valued functions.
结果将被连接成一个向量,它是最有用的标量值函数。


值----------Value----------

A vector of results
一个向量的结果


(作者)----------Author(s)----------



Tim Keitt <tkeitt@gmail.com>




参见----------See Also----------

ternary.field
ternary.field


实例----------Examples----------


## The function is currently defined as[#功能目前被定义为]
function(grid, f, ...)
{
        f = match.fun(f)
        abc = grid[,letters[1:3]]
        g = function(i) f(abc[i,], ...)
        unlist(lapply(1:nrow(grid), g))
  }

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-15 04:18 , Processed in 0.022046 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表