Dear community
I've created a lot of numeric variables with the following naming convention: TIME[WEEK][WEEKDAY][HOUR][STATUS]
[week] has 2 digits, [weekday] 1 digit, [hour] 2 digits, [status] 1 digit (1/2 dummy).
Ex: August 13 10 AM would be named: TIME334102 ( I use European calendar and week calculations).
In the variables I've stored minute values ranging from 0 to 60.
I would for instance like to sum all TIME variables with [weekday]=4.
Can this be done?
I know the array num_vars
Any help is appreciated.
Thank you.
Some example of what your data actually looks like would be helpful.
Depending on what your project started with you might have been better off with single variable for date/time and another for what ever you want to sum. If all of your summary activities are going to work around ideas like week of year, day of week then a date variable might suffice.
If you have a date variable then you can inspect that easily with functions such as Year, Month, Day and such and often summarize with other procedures by assigning a format to the date variable to create groups.
Some example of what your data actually looks like would be helpful.
Depending on what your project started with you might have been better off with single variable for date/time and another for what ever you want to sum. If all of your summary activities are going to work around ideas like week of year, day of week then a date variable might suffice.
If you have a date variable then you can inspect that easily with functions such as Year, Month, Day and such and often summarize with other procedures by assigning a format to the date variable to create groups.
Hi
I actually solved my problem right after posting it.
Seems that just to formulate the problem helped me solve it.
Thank you anyway.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.