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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.