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

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.

 

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