[R] How to read a text table? A bit of trouble with Using R - An Introduction

Mark Myatt mark at myatt.demon.co.uk
Tue Feb 27 15:13:06 CET 2001


Hzi Writes:


>Hello everyone!
>
>    Here´s a *truly newbie question*! (Oh, and BTW, I did read the
>documentation and the mailing list archive)

[Stuff deleted]

First ... you need to use a plain text editor. Use NotePad under Windows
if you have nothing else.

Type the file like this:

"Year" "NSW" "Vic." "Qld" "SA" "WA" "Tas." "NT" "ACT" "Aust."
1917 1904 1409  683  440  306 193   5   3  4941
1927 2402 1727  873  565  392 211   4   8  6182
1937 2693 1853  993  589  457 233   6  11  6836
1947 2985 2055 1106  646  502 257  11   4  1947
1957 3625 2656 1413  873  688 326  21  38  9640
1967 4295 3274 1700 1110  879 375  62 103 11799
1977 5002 3837 2130 1286 1204 415 104 214 14192
1987 5617 4210 2675 1393 1496 449 158 265 16264
1997 6274 4605 3401 1480 1798 474 187 310 18532

Note the double quotes round the column labels and the space (not TAB)
between each item of data. You can line them up with spaces (as above)
or just use a single space.

Save the file as 

        austpop.txt

Notepad is a truly awful program and will not allow you to add
extensions to file names so you will have to save it without the .txt
extension (which NotePad will add for you).

All should be well now.

Mark

--
Mark Myatt


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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