########## ## # Reading the data into R: my.datafile <- tempfile() cat(file=my.datafile, " 1 5.7 34 10 0.409 174 2 8.1 68 17 0.501 745 3 8.3 70 17 0.445 814 4 7 54 17 0.442 408 5 6.2 37 12 0.353 226 6 11.4 79 27 0.429 1675 7 11.6 70 26 0.497 1491 8 4.5 37 12 0.38 121 9 3.5 32 15 0.42 58 10 6.2 45 15 0.449 278 11 5.7 48 20 0.471 220 12 6 57 20 0.447 342 13 5.6 40 20 0.439 209 14 4 44 27 0.394 84 15 6.7 52 21 0.422 313 16 4 38 27 0.496 60 17 12.1 74 27 0.476 1692 18 4.5 37 12 0.382 74 19 8.6 60 23 0.502 515 20 9.3 63 18 0.458 766 21 6.5 57 18 0.474 345 22 5.6 46 12 0.413 210 23 4.3 41 12 0.382 100 24 4.5 42 12 0.457 122 25 7.7 64 19 0.478 539 26 8.8 70 22 0.496 815 27 5 53 23 0.485 194 28 5.4 61 23 0.488 280 29 6 56 23 0.435 296 30 7.4 52 14 0.474 462 31 5.6 48 19 0.441 200 32 5.5 50 19 0.506 229 33 4.3 50 19 0.41 125 34 4.2 31 10 0.412 84 35 3.7 27 10 0.418 70 36 6.1 39 10 0.47 224 37 3.9 35 19 0.426 99 38 5.2 48 13 0.436 200 39 5.6 47 13 0.472 214 40 7.8 69 13 0.47 712 41 6.1 49 13 0.464 297 42 6.1 44 13 0.45 238 43 4 34 13 0.424 89 44 4 38 13 0.407 76 45 8 61 13 0.508 614 46 5.2 47 13 0.432 194 47 3.7 33 13 0.389 66 ", sep=" ") options(scipen=999) # suppressing scientific notation treeweight <- read.table(my.datafile, header=FALSE, col.names=c('obs', 'dbh', 'height', 'age', 'grav', 'weight')) attach(treeweight) # The data frame called treeweight is now created. #########