sas - 错误说没有给出变量 X,但变量 x 是在之前声明的
问题描述
尝试在 SAS 中绘制它时出现错误,错误表示未给出变量 X,但变量 x 之前已声明。
这是我的代码:
data prg7_5;
do a=1 to 3;
input x@@;
output
end;
cards;
7028 1764 600 7228 2036 744
7228 2130 804 8448 2536 844
8567 2436 912 9061 2436 1128
9167 3108 1320 9167 3108 1464
10032 3108 1608 10051 3208 1896
;
run;
goptions hsize=5 vsize=4 ftext='宋体';
footnote 'the time ';
symbol1 interpol=boxt00 width=1.8 bwidth=5 co=red;
axis1 label =('temperature(C)')
value=('190' ' 220 ' '260')
minor=none
offset=(10,10);
axis2 label =(angle=90'the time')
offset=(0,0);
proc gplot data= prg7_5;
plot x*a/haxis=axis1
vaxis=axis2;
run;
解决方案
输出后需要一个分号。您的数据集将为空,并且您有以下错误。
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
在输出中用分号更改代码,如下所示
do a=1 to 3;
input x@@;
output;
end;
推荐阅读
- python - Python:for循环填充字典项目它不应该
- c++ - 在堆或堆栈上分配的 std::queue 内存
- java - 将pdf文件加载到已经构建的jar
- c# - 如何在 SpringBoot 控制器中使用 WebClient.UploadFile (.NET) 上传的文件?
- html - svg 动画 奇怪的行为
- c# - 无法在 Web Api 控制器中设置 HttpResponseMessage 的 RequestUri
- java - 如何在 Java 中将汇编代码转换为机器代码
- r - 使用 R 根据公共变量组合数据框中的行
- c# - 带有批量电子邮件的 SmtpClient SendMailAsync 成功发送了大约 1200 封,其余的都失败了。任何指针?
- php - 使用ajax和php按价格排序