我需要創建工作像下面這樣的標誌: 的標誌的值始終爲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