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

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

[复制链接]
发表于 2012-9-30 02:37:28 | 显示全部楼层 |阅读模式
lv3(simecol)
lv3()所属R语言包:simecol

                                        Lotka-Volterra-Type Model with Resource, Prey and Predator
                                         的Lotka-Volterra型资源,猎物和捕食者模型

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

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

simecol example: predator prey-model with three equations:
simecol例如:捕食模型与三个方程:


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


data(lv3)



格式----------Format----------

A valid S4 object according to the odeModel specification.  The object contains the following slots:
一个有效的S4对象,根据odeModel规格。该对象包含以下插槽:




main Lotka-Volterra equations for predator
main Lotka-Volterra方程的捕食者

.





parms Vector with named parameters of the model:
parms向量的命名参数的模型:




c growth rate of the prey population,
c的猎物人口增长率,




d encounter rate of predator and prey,
d遇到的捕食者和猎物的速度,




e yield factor (allows conversion with respect to d),
e产量因子(允许d转换,),




f death rate of the predator population,
f死亡率的捕食者人口,




g recycling parameter.
g回收参数。




inputs Time series specifying external delivery of resource.
inputs的时间序列指定外部提供的资源。




times Simulation time and integration interval.
times模拟时间和积分的时间间隔。




init Vector with start values for s, p and k.
init向量的起始值s,p和k。




s Resource (e.g. grassland or phosphorus).
s资源(例如草地或磷)。




p Producer (prey).
p生产(猎物)。




k Consumer (predator).
k消费者(捕食者)。




solver Character string specifying the integration method.
solver字符串指定的集成方法。


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

simecol-package, sim, parms, init, times.
simecol-package,sim,parms,init,times。


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


##============================================[#============================================]
## Basic Usage:[#的基本用法:]
##   explore the example[#探索的例子]
##============================================[#============================================]
data(lv3)
plot(sim(lv3))
times(lv3)["by"] <- 5    # set maximum external time step to a large value[设置最大的外部时间步长较大的值]
plot(sim(lv3))           # wrong! automatic time step overlooks internal inputs[错了!自动时间步长俯瞰内部输入]
plot(sim(lv3, hmax = 1)) # integration with correct maximum internal time step[正确的最大内部时间步长的整合]

##============================================[#============================================]
## Implementation:[#实现:]
##   The code of the model[#代码的模型]
##============================================[#============================================]
lv3 <- new("odeModel",
  main = function(time, init, parms, inputs) {
    s.in <- approxTime1(inputs, time, rule = 2)["s.in"]
    with(as.list(c(init, parms)),{
      ds <- s.in  - b*s*p + g*k
      dp <- c*s*p - d*k*p
      dk <- e*p*k - f*k
      list(c(ds, dp, dk), s.in = s.in)
    })
  },
  parms = c(b = 0.1, c = 0.1, d = 0.1, e = 0.1, f = 0.1, g = 0),
  times  = c(from = 0, to = 200, by = 1),
  inputs = as.matrix(
    data.frame(
      time = c(0,   99, 100,  101, 200),
      s.in = c(0.1, 0.1, 0.5, 0.1, 0.1)
    )
  ),
  init = c(s = 1, p = 1, k = 1), # substrate, producer, consumer[基板,生产者,消费者]
  solver = "lsoda"
)  

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 03:54 , Processed in 0.033453 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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