我需要创建工作像下面这样的标志: 的标志的值始终为1时条件为真 ID Date Condition Flag Amount
1 2015.04.01 False 0 0
1 2015.05.01 True 1 0
1 2015.06.01 True 1 0
的标志的值始终为1年以内的条件设置为false ID Date Condition Flag Amount
1
我有以下形式的数据帧: person currentTest beforeValue afterValue
1 1 A 1.284297055 2.671763513
2 2 A -0.618359548 -2.354926905
3 3 A 0.039457430 -0.091709968
4 4 A -0.448608324
我已经将一个CSV文件导入R.它生成8列。它有200行(或观察)我的所有相关数据都在第5行中的一个单一字符“变量”。下面是从5行中的一个观察一个示例: {"answers":{"#userdefined-7fb430bc-3615-0373-89c6-e155172da89c":6,"attachedVsSorrowful":1,"dysregulation":0,"note":"I had a