[R] export-problem

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Aug 13 18:02:39 CEST 2001


Lena Lindahl <Lena.Lindahl at sofi.su.se> writes:

> Hello!
> I am trying to export a data-file from SAS to R. It says in the R
> program that the SAS file should be in XPORT-format. I assume that the
> file should have and .xpt extension. But when I try to open the file
> in R I get only the message "compressed" written all over. So,
> probably I should un-compress the file in the R-program, the question
> is how?
> 
> Very greatful for quick help!

Like this:

-----------------------------------
libname peter xport "dataset.xpt";

DATA hej;
  input x y z;
  cards;
  1 2 3
  2 3 4
  5 6 7
  4 5 8
;

DATA peter.hej;
  SET hej;
--------------------------------------

(of course that could have been "DATA peter.hej;" directly, but you
might have the data set generated by other means.)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list