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

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

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

                                        Lotka-Volterra Predator-Prey Model
                                         的Lotka-Volterra捕食模型

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

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

simecol example: basic Lotka-Volterra predator prey-model.
simecol例如:基本的Lotka-Volterra捕食模型。


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


data(lv)



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

An S4 object according to the odeModel specification. The object contains the following slots:
S4的对象根据odeModel规格的。该对象包含以下插槽:




main Lotka-Volterra equations for predator and prey.
main的Lotka-Volterra方程捕食者和猎物。




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




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




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




k3 death rate of the predator population.
k3的捕食者人口死亡率。




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




init Vector with start values for predator and prey.
init捕食者和猎物向量的起始值。


Details

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

To see all details, please have a look into the implementation.
要看到所有的详细信息,请,看看进入实施。


参考文献----------References----------


Mem. Acad.Lincei, 2, 31-113.

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

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


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


##============================================[#============================================]
## Basic Usage:[#的基本用法:]
##   explore the example[#探索的例子]
##============================================[#============================================]
data(lv)
print(lv)
plot(sim(lv))

parms(lv) <- c(k1=0.5, k2=0.5, k3=0.5)
plot(sim(lv))

##============================================[#============================================]
## Implementation:[#实现:]
##   The code of the Lotka-Volterra-model[#代码的Lotka-Volterra模型]
##============================================[#============================================]
lv <- new("odeModel",
  main = function (time, init, parms) {
    x <- init
    p <- parms
    dx1 <-   p["k1"] * x[1] - p["k2"] * x[1] * x[2]
    dx2 <- - p["k3"] * x[2] + p["k2"] * x[1] * x[2]
    list(c(dx1, dx2))
  },
  parms  = c(k1=0.2, k2=0.2, k3=0.2),
  times  = c(from=0, to=100, by=0.5),
  init   = c(prey=0.5, predator=1),
  solver = "rk4"
)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 04:31 , Processed in 0.026411 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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