R中的限制命令?

Got*_*iam 2 math r

R 中的 take a limit 命令或函数是什么?

(我无法通过使用 ? 和 ?? 函数或在介绍手册中进行搜索来找到它。lim() 和 limit() 不存在。)

这是在 F(X) 的极限 X->Y+ 的意义上。我的意思不是写代码的人;我的意思是,作为安装标准包含在 R 中,提供的函数称为什么。

(注意:我之前关于这个主题的问题已被编辑为完全清楚......但它仍然被搁置......我想版主忘记了......因此这个问题。)

G. *_*eck 5

Ryacas 包可以做限制:

library(Ryacas)     # version 1.1.1
x <- ysym("x")      # define x as a symbolic variable
lim(sin(x)/x, x, 0) # limit of sin(x)/x as x approaches 0
## 1
Run Code Online (Sandbox Code Playgroud)

或在 Ryacas0

library(Ryacas)
x <- Sym("x") # define x as a symbolic variable
Limit(sin(x)/x, x, 0) # limit of sin(x)/x as x approaches 0
## expression(1)
Run Code Online (Sandbox Code Playgroud)

还有 rSymPy 包:

library(rSymPy)    # version 0.2-1.2
sympy("var('x')")  # define x as a symbolic variable
## [1] "x"
sympy("limit(sin(x)/x, x, 0)")
## [1] "1"
Run Code Online (Sandbox Code Playgroud)