read.mtp, etc.

Douglas Bates bates@stat.wisc.edu
15 Dec 1999 18:18:00 -0600


Saikat DebRoy and I have created a "foreign" package to read data in
formats stored by various well-known statistical packages.  The
read.stata function is already available in another package.
Saikat is currently working on a function to read SAS XPORT format.
I have created a read.mtp function for Minitab Portable Worksheet
format.  We will upload this package to CRAN by next week.

I think we will change all of these to read.foreign before uploading
and make it so the file name extension indicates the type of file.

> system("cat /fd0/minitab/ex1-10.mtp")
Minitab Portable Worksheet P1.1             1994 522 Release 9.1               .
%      3      1     50      0 conc                                             .
 5.579999924E+01 6.089999771E+01 3.699999619E+01 9.129999542E+01 6.579999542E+01
 4.229999924E+01 3.379999924E+01 6.059999847E+01 7.599999237E+01 6.899999237E+01
 4.589999771E+01 3.909999847E+01 3.549999619E+01 5.599999619E+01 4.459999847E+01
 7.169999695E+01 6.119999695E+01 6.149999619E+01 4.719999695E+01 7.449999237E+01
 8.319999695E+01 3.999999619E+01 3.169999886E+01 3.669999695E+01 6.229999924E+01
 4.729999924E+01 9.459999847E+01 5.629999924E+01 2.999999809E+01 6.819999695E+01
 7.529999542E+01 7.139999390E+01 6.519999695E+01 5.259999847E+01 5.819999695E+01
 4.799999619E+01 6.179999924E+01 7.879999542E+01 3.979999924E+01 6.499999237E+01
 6.069999695E+01 7.709999847E+01 5.909999847E+01 4.949999619E+01 6.929999542E+01
 6.979999542E+01 6.489999390E+01 2.709999847E+01 8.709999847E+01 6.629999542E+01
> read.mtb("/fd0/minitab/ex1-10.mtp")
$conc
 [1] 55.80000 60.90000 37.00000 91.30000 65.80000 42.30000 33.80000 60.60000
 [9] 75.99999 68.99999 45.90000 39.10000 35.50000 56.00000 44.60000 71.70000
[17] 61.20000 61.50000 47.20000 74.49999 83.20000 40.00000 31.70000 36.70000
[25] 62.30000 47.30000 94.60000 56.30000 30.00000 68.20000 75.30000 71.39999
[33] 65.20000 52.60000 58.20000 48.00000 61.80000 78.80000 39.80000 64.99999
[41] 60.70000 77.10000 59.10000 49.50000 69.30000 69.80000 64.89999 27.10000
[49] 87.10000 66.30000

> system("cat /fd0/minitab/ex12-15.mtp")
Minitab Portable Worksheet P1.1             1994 522 Release 9.1               .
%      3      1     11      0 x                                                .
 2.499999762E+00 5.029999733E+00 7.599999905E+00 1.159999943E+01 1.299999905E+01
 1.959999847E+01 2.619999886E+01 3.299999619E+01 3.999999619E+01 4.999999619E+01
 5.499999619E+01                                                               .
%      3      2     11      0 y                                                .
 7.679999828E+00 6.949999809E+00 6.299999714E+00 5.749999523E+00 5.009999752E+00
 1.429999948E+00 9.299999475E-01 7.199999690E-01 6.799999475E-01 6.499999762E-01
 5.599999428E-01                                                               .
> read.mtb("/fd0/minitab/ex12-15.mtp")
$x
 [1]  2.50000  5.03000  7.60000 11.60000 13.00000 19.60000 26.20000 33.00000
 [9] 40.00000 50.00000 55.00000

$y
 [1] 7.6799998 6.9499998 6.2999997 5.7499995 5.0099998 1.4299999 0.9299999
 [8] 0.7200000 0.6799999 0.6500000 0.5599999

-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._