0
我正在使用R来集成一个函数与多个变量,其中每个变量是一个向量。我如何获得矢量解决方案?我对R完全陌生,并且对我一般的编码都是如此。整合多个变量,其中每个变量是R中的一个向量?
考虑以下变量: variable inputs
下面是我用失败的码:
> library(readr)
> R_test_file <- read_csv("~/R test file.csv")
Parsed with column specification:
cols(
Conversion = col_double(),
`Activation Energy (kJ/mol)` = col_double(),
`Ta upper (Kelvin)` = col_double(),
`Ta lower (Kelvin)` = col_double()
)
> View(R_test_file)
> Ea = R_test_file$`Activation Energy (kJ/mol)`
> TaU = R_test_file$`Ta upper (Kelvin)`
> TaL = R_test_file$`Ta lower (Kelvin)`
> int.fun=function(Ea,T) (exp(-Ea/(8.314462*T)))/(5(exp(-Ea/(8.314462*1173))))
> integrate(int.fun, TaL, TaU)
任何帮助,您可以提供将不胜感激。
感谢那些工作 –