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

R语言 scuba包 whichtank()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 23:11:12 | 显示全部楼层 |阅读模式
whichtank(scuba)
whichtank()所属R语言包:scuba

                                        Which Tanks are Used during a Dive
                                         潜水过程中使用了坦克

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

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

Determine which tank of breathing gas is used at each time point during a dive.
确定用于在每个时间点在潜水呼吸气体罐。


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


whichtank(d)
whichtank(d) <- value



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

参数:d
The dive (an object of class "dive").
潜水(一个类的对象"dive"“)。


参数:value
Vector of integers or character strings identifying which tank of breathing gas is used at each time point.  
整数或字符串识别呼吸气体的罐是在每个时间点使用的向量。


Details

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

An object of class "dive" represents a scuba dive, including information about depth, time and gas breathed at each stage of the dive. These objects are created by the function dive.
一个对象的类"dive"的代表潜水,包括深度信息,在每个阶段的潜水时间和气体吸入。创建这些对象的功能dive。

A dive object has a tank list which is a list of the tanks of breathing gas that were used (or were available to be used) during the dive. The function tanklist returns this list.
潜水对象,这是一个列表,使用(或可使用)在潜水过程中的呼吸气体的坦克坦克列表。函数tanklist返回此列表。

The selection of tanks, i.e. which tank is actually used at each stage of the dive, is specified by whichtank. The command whichtank(d) returns a vector of integers or character strings, identifying which tank in the tank list is in use at each waypoint during the dive. That is, whichtank(d)[i] is the tank in use at the ith waypoint during the dive.
坦克,即罐实际使用的潜水在每个阶段,选择指定的whichtank。命令whichtank(d)返回一个向量的整数或字符串,确定坦克在坦克列表是在潜水过程中使用的每个航点。也就是说,whichtank(d)[i]是坦克的使用在i在潜水过程中的个航点。

The command whichtank(d) <- value will change the selection of tanks used at each stage during the dive. Here value should be a vector of integers or character strings identifying tanks in the tank list, and the length of value should be  equal to the length of the vectors depths.dive(d) and depths.dive(d).
命令whichtank(d) <- value将改变选择在潜水过程中每个阶段使用的坦克。这里value应该是一个矢量的整数或字符串识别水箱列表中的坦克,和value的长度应该是相等的长度的矢量depths.dive(d)和depths.dive(d)的。

A common use of whichtank is to specify that a particular gas should be used only in a particular range of depths. This is done by applying ifelse to depths.dive as shown in the Examples.
whichtank一个常见的用途是指定一个特定的气体应只用于在特定的深度范围。这是通过施加ifelsedepths.dive在实施例中所示。


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

The value of whichtank(d) is a vector of integers or character strings.
whichtank(d)是一个向量的整数或字符串。


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


Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>




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

dive, tanklist
dive,tanklist


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


   # tanks are numbered[坦克的编号]
   d <- dive(air, c(30,40), 6, nitrox(0.5), c(6,3), c(3,3))
   d
   tanklist(d)
   whichtank(d)
   # change choice of tank at 6 metre deco stop[改变选择的坦克装饰停在6米]
   # The Hard Way:[艰难的历程:]
   whichtank(d) <- c(1,1,1,1,1,2,2,2)
   d

   # The Snazzy Way:[时髦的方式:]
   # if shallower than 3 metres, then tank 2, else tank 1[如果深度小于3米,然后,否则罐2罐1]
   whichtank(d) <- ifelse(depths.dive(d) <= 3, 2, 1)
   d

   # tanks with names[坦克的名字]
   dd <- dive(tanklist=list(travel=trimix(0.18, 0.5), deco=nitrox(0.8)),
             tank="travel", c(30,40), c(20, 10), 9, tank="deco",
             c(9,10), c(6,5), c(3,5))
   dd
   # if shallower than 6 metres, then deco gas, else travel gas[如果深度小于6米,装饰气体,其他旅游气体]
   whichtank(dd) <- ifelse(depths.dive(dd) <= 6, "deco", "travel")
   dd

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 22:44 , Processed in 0.038239 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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