- integ=function(f,n){
- x=runif(10000)
- # computes vector y = f(x)
- y=f
- hatI=mean(y)
- hatI
- }
- # example of use
- integ(x^2+x+100,100)
这个出现error
我要怎样把x^2+x+100作为一个expression写在function里面呢?
谢谢!
|
楼主: casperyc
|
1967
3
怎样用expression作为function的arguement? |
|
硕士生 61%
-
|
回帖推荐本帖被以下文库推荐
| ||
|
|
| ||
|
我的征途是星辰大海。
|
||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


