你好,
我有一個簡單的例子,我們對一堆樣本(在“變量 x”列中)進行動力學(在“時間(分鐘)”列中)。 我需要創建一個新列,該列運行一個累積總和,該總和說明“變量 x”中列出的每個樣本所用的時間。 我嘗試了 col 累積總和函數,但它沒有完成目標。
我懷疑行、滯後或偏移是一個好方法,但我不知道如何將它們組合在一起。 我附上了一個
names default to here(1);
New Table( "noci",
Add Rows( 8 ),
New Column( "variable X",
Character,
"Nominal",
Set Values( {"a", "a", "a", "a", "b", "b", "b", "b"} )
),
New Column( "Time (min)",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 1, 2, 3, 4] )
),
New Column( "Nociception Data",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 1, 2, 3, 1, 2, 1] )
),
New Column( "Cumulative nociception as function of ellapse time",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 3, 4, 6, 3, 4, 6, 7] )
)
)示例數據表
任何讓我走上正軌的投入將不勝感激!
最好的
塞巴斯蒂安
為什麼 Col Cumulative Sum() 沒有實現目標? 如果“作為消逝時間函數的累積傷害感受”具有您想要的值,則 col 累積總和似乎有效。
Col Cumulative Sum(:Nociception Data, :variable X)

我也可能遺漏或理解錯誤,而您想要不同的東西,如果是這種情況,您能否提供具有正確結果的列?