[英]How to write a function in R
given a function给定一个 function
I'm not sure how to write this in R, I wrote it as:我不确定如何在 R 中写这个,我把它写成:
But I'm getting this error:但我收到了这个错误:
Maybe you are looking for this:也许你正在寻找这个:
#Function
f <-function(x) {4*x*exp(-2*x)}
#Integral
integrate(f,lower = 0,upper = Inf)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.