0 Replies - 349 Views - Last Post: 25 April 2013 - 07:23 PM Rate Topic: -----

#1 shannon32191  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-April 13

Question about importing/manipulating an excel file in SAS

Posted 25 April 2013 - 07:23 PM

For my project I need to import and analyze data from a file. I decided to do an Excel file and SAS takes this data and makes code for it.
DATA WORK.Normtemp;
    LENGTH
        'Body Temp'n       8
        Gender             8
        'Heart Rate'n      8 ;
    FORMAT
        'Body Temp'n     BEST12.
        Gender           BEST12.
        'Heart Rate'n    BEST12. ;
    INFORMAT
        'Body Temp'n     BEST12.
        Gender           BEST12.
        'Heart Rate'n    BEST12. ;
    INFILE DATALINES4
        DLM='7F'x
        MISSOVER
        DSD ;
    INPUT
        'Body Temp'n     : BEST32.
        Gender           : BEST32.
        'Heart Rate'n    : BEST32. ;
DATALINES4;
;;;;



However this is an introduction SAS course and we din't really learn about importing and working with excel files like this. I am not entirely sure how to get the mean and variance for Body Temp and Heart Rate. I guess I'm asking how can I define them to be manipulated elsewhere.
I'm looking for code similar to this
data one; 
input x; 
cards; 
 3 
 4 
 7 
 ; 
proc print data=one; 
 run; 
proc means mean; 
 var x; 
 title


I'm not sure if it's even possible to do that or if it would maybe be easier to work data off the SAS server.
Any help is greatly appreciated!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1