你好,
我有一个简单的例子,我们对一堆样本(在“变量 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)

我也可能遗漏或理解错误,而您想要不同的东西,如果是这种情况,您能否提供具有正确结果的列?