Hi,
Is it possible to get N=0 when there are zero observations in a dataset?
Ex:
data cls;
set sashelp.class;
age=0;
if age ne 0;
run;
In the below, the output dataset is empty. Instead if I want to see N=0 indicating there are no records in a dataset, how can I do?
proc means data=cls stackodsoutput;
var age;
output out=cl_m;
run;
Statistical procedures need at least one row of data to report on, even if all variable values are missing. Zero rows means no statistics.
If you want to report on zero row tables then PROC CONTENTS is a better option:
Statistical procedures need at least one row of data to report on, even if all variable values are missing. Zero rows means no statistics.
If you want to report on zero row tables then PROC CONTENTS is a better option:
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.