LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 4 Mar 2002 11:03:27 -0800
Reply-To:     Cassell.David@EPAMAIL.EPA.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV>
Subject:      Re: reading a matrix with character values with SAS/IML
Content-type: text/plain; charset=us-ascii

Philippe.Guiblin@ONS.GOV.UK wrote: > Does anyone know how to read a sas-dataset containing both numeric and character values within sas iml? > > I have used the lines below but sas/iml only reads the numeric variables of the sas-dataset mat1and put it > into mat1. > /*************/ > proc iml; > > use a.mat1; > read all into mat2; > /*************/

You don't really want to read numeric and character variables into one matrix, do you? IML assumes the matrix is one or the other, not both. Try something like this instead:

read all var _num_ into mat2; read all var _char_ into mat3;

HTH, David -- David Cassell, CSC Senior computing specialist mathematical statistician

Back to: Top of message | Previous page | Main SAS-L page