|Date: ||Mon, 14 Aug 2006 23:51:53 -0400|
|Reply-To: ||Arthur Tabachneck <art297@NETSCAPE.NET>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Arthur Tabachneck <art297@NETSCAPE.NET>|
|Subject: ||Re: Importing Variables to SAS Data Set|
You probably haven't provided enough information for anyone to be sure
they would be giving good advice.
However, a couple of things you might want to consider:
First, you could import the data, treating the header row as data, use the
mixed=yes option, then delete the first row of data and assign desired
variable names. That should assure that all of your data will be read as
Second, were your time variables read in as character? If so, then I
would think that you have to declare your array as character as well.
On Mon, 14 Aug 2006 18:03:29 -0500, Tom A. Schmitt <schmitta@UWM.EDU>
>I have a few questions concerning the SAS code below. I'm importing the
>with the variable names. Is there a way to convert all the variables to
>same type (e.g., character)? Also, for the SAS data set sci_final_pp the
>variables from sci_final do not seem to be recognized appropriately. So,
>not sure if I can create the new data set in this manner with the
>that SAS will read the variables. Thanks in advanced for any suggestions.
>PROC IMPORT DATAFILE="E:\test\sci.xls"
>PROC PRINT DATA=sci_final;
> SET sci_final;
> array Atime [1:3] time_1_SSSci time_2_SSSci time_3_SSSci;
> do time = 1 to 3;
> sci = Atime[time];
> keep org_id student_id time sci;