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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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