您需要花时间阅读JSL上的文档。
帮助==>图书==>脚本指南
这样做的方法是一个非常简单的公式
ACC << New Column( "exp", formula( :Obs +3.3 ) );
您可以通过以下几种方式执行上次回复中列出的操作
New Table( "Example",
Add Rows( 8 ),
New Column( "Obs",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [12.3, 15.4, 18.7, 22, 25.8, 28.9, 32.2, 35.1] )
),
New Column( "exp1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If( Row() == 1,
start = :Obs,
start = start + 3.3
);
start;
)
),
New Column( "exp2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :Obs[1] + (Row() - 1) * 3.3 )
)
);嗨,
想知道是否有人可以帮助我解决语法问题,我希望使用另一个变量的第一个值然后将此值增加3.3,与下面相同,
Obs Expected 12.3 12.3 15.4 15.6 18.7 18.9 22.0 22.2 25.8 25.5 28.9 28.8 32.2 32.1 35.1 35.4
目前我已经设置了如下值,但我真的想自动化,因为我有一些事情要做
Acc << New Column(“exp”,Numeric,Continuous,Format(“fixed dec”,6,1),Set Selected,Set Values([12.3,15.6,18.9,22.2,25.5,28.8,32.1,35.4]) );谢谢大家