如果有人熟悉,我将使用示例植绒代码作为示例
NLCommand("set population 1")
NLCommand("setup")
nruns <- 10
timedata <- list()
for(i in 1:nruns) {
NLCommand("go")
timedata[[i]] <- NLGetAgentSet(c("who","xcor","ycor"),"turtles",
as.data.frame=T,df.col.names=c("who","xcor","ycor")) }
timedata
问题在于它会为每个模型迭代生成新的标头。所以我得到以下而不是标题只出现一次:
[[1]]
who xcor ycor
1 0 34.56833 -26.47777
[[2]]
who xcor ycor
1 0 35.19765 -25.70063
任何帮助将非常感激