Question

How to write "OR" in this example?

DATA a1; set a; if var1=1 OR 2; run;

P.S. va1 is the categorial (with categories: 1, 2, 3)

Was it helpful?

Solution

i'm assuming this will be migrated to stack overflow, but instead of trying to do if var1=1 or 2 wouldn't it be better to use if var1 in (1, 2)?

...and somebody with enough reputation should probably create an sas tag (and an spss tag while you're at it) unless data scientists only use open source languages like r and python now...

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top