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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 752 views
  • 0 likes
  • 2 in conversation