Reading Data
Data for analysis using ASReml-R are generally contained in a text file or a spreadsheet and are read into a data frame using the appropriate R functions.
| Variety | Id | pid | raw | Rep | nloc | yield | lat | long | Row | Column | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | LANCER | 1 | 1101 | 585 | 1 | 4 | 29.25 | 4.3 | 19.2 | 16 | 1 |
| 17 | BRULE | 2 | 1102 | 631 | 1 | 4 | 31.55 | 4.3 | 20.4 | 17 | 1 |
| 18 | REDLAND | 3 | 1103 | 701 | 1 | 4 | 35.05 | 4.3 | 21.6 | 18 | 1 |
| 19 | CODY | 4 | 1104 | 602 | 1 | 4 | 30.1 | 4.3 | 22.8 | 19 | 1 |
| 20 | ARAPAHOE | 5 | 1105 | 661 | 1 | 4 | 33.05 | 4.3 | 24 | 20 | 1 |
| 21 | NE83404 | 6 | 1106 | 605 | 1 | 4 | 30.25 | 4.3 | 25.2 | 21 | 1 |
Character fields and numeric fields are often not treated as factors, and you must manually convert them into factors as required.
The function asreml.read.table() reads data from a text file and automatically converts variates whose names begin with a capital letter in the header line into factors.

