我无法遍历 data.Frame。
# a is a dataframe, with names 'f','d','sess', ...
for (x in a)
# find all events BEFORE the event x
# ('d' is the beginning of the event in ms, 'e' is the end of it)
a[a$f < as.numeric(x['d']),] -> all_before
x['Epe'] = min( as.numeric(x['d'])-all_before$f)
}
它只是不会改变我原来的data.frame。有没有办法 即时更改我的数据框,或者我应该绝对创建一个新的并填写它?谢谢!