13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.2 Practical 39NAME='C:/Program files/Gen15ed/Data/Iron.dat';\MISSING='*'; SEPARATOR=' '; MAXCATEGORY=15]sample,site,FE,weight; FGROUPS=check(omitting the parameter name as it is the first parameter). When the names are read fromthe file, the IDENTIFIER parameter is set by default to the identifiers that are foundthere.The FGROUPS parameter allows structures to be turned automatically into factors. Thedefault setting is check. If you are running GenStat interactively, FILEREAD will thenprompt for a decision about any structure where the number of distinct values is less thanor equal to the setting supplied by the MAXCATEGORY option. If you are running GenStatin batch, all structures with these few distinct values become factors automatically.FGROUPS can also be set to form or leave to tell GenStat explicitly whether eachstructure should or should not be defined automatically as a factor.Columns that are not defined to be factors are defined as either texts or variates,according to whether FILEREAD finds a number or character string for that data structurein the first record with no missing values that it finds in the file. However, you can usethe REPRESENTATION parameter to tell FILEREAD explicitly whether a data structureshould contain numbers or characters (and you must always do this if there are no unitswithout missing values).There are several options that are not shown in our example. These are required lessoften, but we explain them briefly below.The END option specifies the string that will be used to denote the end of the data. Thedefault is the colon character (:). The end of the file will also terminate the data, so youneed specify this only if you want to stop reading data before the end.The COMMMENTSYMBOLS option can be set to a list of single characters, in quotes. Ifany of these characters is found at the start of a record, before any data has been read, thatrecord will be treated as a comment. By default, the double-quote symbol is the onlycomment symbol, but it must appear at the start of every record to be treated as acomment.The SKIP option allows records at the start of the file to be skipped altogether. It canbe set either to the number of records to be skipped, or to a string, indicating that allrecords are to be skipped up to and including the first record containing that string.The ISAVE option can be set to a pointer to store the identifiers read from the file (ifIMETHOD=read) or supplied interactively (if IMETHOD=supply). Also, the IMETHODoption has an additional setting none. With this setting, the identifiers of the datastructures can still be defined using the IDENTIFIER parameter. Alternatively, if theISAVE option is set but IDENTIFIER is unset, the data structures will be set up aselements of the ISAVE pointer. If both ISAVE and IDENTIFIER are unset, FILEREADjust reports on the contents of the file.4.2 PracticalThe file Bacteria.dat in the Data folder contains the lines"Counts of bacteria and crop type, Jan-Feb 2008"18 pea117 pea21 cereal7 pea176 cereal85 cereal244 cereal4 pea55 cereal8 pea73 cereal* pea3 pea4 pea40 cereal198 cereal

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!