1
有什么办法来transfrom以下SAS代码:使用R将表的代码类型“If ... Then ....”转换为表格?
If CRM = 50 then coefgpc=coefgpc * 1;
Else If CRM <= 54 then coefgpc=coefgpc * 1.12;
Else If CRM <= 59 then coefgpc=coefgpc * 1.245;
Else If CRM <= 99 then coefgpc=coefgpc * 1.609;
Else If CRM = 100 then coefgpc=coefgpc * 1.987;
Else If CRM >= 101 then coefgpc=coefgpc * 2.223;
到表是这样的:
375来自另一个文件,它应该手动输入
谢谢,在问题中编辑! – Metariat
代码中的“\ n | \ * | =”是什么意思? – Metariat
'|'分隔了我们分割文本的三个方面:由新行字符('\ n'),星号('\\ *')和等号('=') – MichaelChirico