🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-27-2013 04:32 AM
(1125 views)
The idea is that you can have a dataset with many variables so it would take much time writing each one by one.
How can you add all variable names from a dataset to a matrix, without explicitly writing each one by one ?
If there is no such defined option (e.g. within use/read/close options), then is there a trick to do that?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc iml;
use MyData;
read all var _NUM_ into X;
For details and related issues, see Reading ALL variables INTO a matrix - The DO Loop
http://blogs.sas.com/content/iml/2012/01/16/reading-all-variables-into-a-matrix/
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc iml;
use MyData;
read all var _NUM_ into X;
For details and related issues, see Reading ALL variables INTO a matrix - The DO Loop
http://blogs.sas.com/content/iml/2012/01/16/reading-all-variables-into-a-matrix/