R中的极限指令? [英] Limit Command in R?
问题描述
R中的极限指令或功能是什么?
What is the take a limit command or function in R?
(我无法通过使用?和??函数或入门手册进行搜索来找到它.lim()和limit()不存在.)
(I could not find it by searching using ? and ?? functions or in introductory manuals. lim() and limit() do not exist.)
在某种意义上说是F(X)的极限X-> Y +.我并不是说有人在写代码;我的意思是,作为已安装的标准包含在R中,提供的功能称为什么.
This is in the sense of limit X->Y+ of F(X). I don't mean anyone writing code; I mean, included in R as installed standard, what the supplied function is called.
(注意:我之前对这个主题的问题已被编辑,以使其完全清楚……但仍处于搁置状态……我想主持人忘记了它……因此出现了这个问题.)
(Note: my previous question on this topic has been edited to be fully clear ... but it is still on hold... I suppose that moderators forgot about it ... hence this question.)
推荐答案
Ryacas软件包可以进行限制:
The Ryacas package can do limits:
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
或在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)
还有rSymPy软件包:
Also the rSymPy package:
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"
这篇关于R中的极限指令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!