我写了一个脚本,可以进行许多计算。该脚本需要10个值进行计算。字符串,日期和数字。
Alpha <- "Test"
Beta <- "B"
Gamma <- "C"
Delta <- "D"
Date_Low <- "03.02.2009"
Low <- 0.57100
Hoch <- 0.97900
Date_High <- "10.10.2010"
Grid <- 5
Parm <- 1000
在csv文件中,我的标题位于第一行,然后是34行。这是一个例子
"Alpha","Beta","Gamma","Delta","Date_Low","Low","High","Date_High","Grid","Parm"
"Test","B","C","D","09.08.2012","0.57100","0.97900","18.12.2008","5","1000"
我要导入csv。
data <- read.csv("data.csv", header = TRUE)
如何正确读取csv文件,并且foreach循环是正确的选择?如何将值传递给函数?可以帮助一些代码行吗?