@omka_ wrote:
Hi Paige,
If arrays look across rows, then how would I do the same thing as I was trying? Attached is the dataset. Also, for the final output, it should contain the records that say Abdominal pain, Eye Irritation and Nasopharyngitis. I am trying to make an array that will look across the rows and choose only the columns that have at least the value 2. If it looks across the row and doesn't find a value greater than or equal to 2, it won't be part of the subset. Below is my code.
Your explanation seems to indicate that you want columns that don't contain values greater than two. But at times, it seems that you want rows where no values exceeds two. So which is it that you want?
I specifically asked for the desired final output, and that has not been provided. It would clear up a lot of confusion.
If you are trying to find columns where no value exceeds two, then you can't use arrays. I showed (and others have showed) how you can use PROC SUMMARY to identify these columns, which is a very simple solution. Others have provided a much more complicated way to do this, but again, we're not really 100% sure what you want.
... View more