BookmarkSubscribeRSS Feed
Alex90
Calcite | Level 5

Hi Rick

I have a question regarding printing in do loop in proc iml . This is my programm :

proc iml;

do t=1 to 5;

a=t*2;

print a;

end;

quit;

The problem i have encountered is when i run the above program i get 5 different values of a , but what i actually want is to have all those 5 values in one vector . I don't know how to do that in iml .

Waiting for your response

Regards

Alex

1 REPLY 1
Reeza
Super User

http://support.sas.com/publishing/pubcat/chaps/63119.pdf

Docs are always useful.

t isn't defined as a vector so expecting a vector as an answer doesn't seem logical to me.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 819 views
  • 0 likes
  • 2 in conversation