//
//read file command
//
//This command is use to read data appointed by file name and project name.
//
//Projct name
//  Project name is appointed after letter '@' as example 2;
//  If project is default directry.you appoint letter '@' only as example 1.
//  Default directory is defined by enviroment variable 'CALC_FDEF'.
//  If read temporaly work file,you need not letter '@' as example 3;
//  Temporaly work file is deleted when this tool is end.
//File name
// This command read file with tab separate whose file extend is tab as default mode.
// If read CSV file, appoint file extend csv explicitly in file name as example.
// But if read tab file,you need not appoint extend file type.
//Header record 
// Data file must have a header record which is list of variable names.
// The header record must bigin by letter '$'.
// If file has not header record,generate auomaticaly generate variables named dmy_1 dmy_2...
//

//Syntax without option
get [filename]@[prjectname];
 
//Syntax with options 
get [filename]@[prjname]/
option
;

//Options
titleline:number //Set variable name by titleline which is appointed by line number
tilte:xx         //If no header record.generate variables named xx_1 xx_2 xx_3...
first:number     //Appoint first data line (default=1)
seperator:conmma //Conmma seperator with words on line
seperator:space  //Space seperator with words on line.
seperator:tab    //Tab separator with words on line.(default)
seperator:|      //Set anay charater sperater with words on line. ex:|   

//(Caution) 
//Prjname is library name which is defined by prj command.   
//    prj [prjname] "pathname";


//Example 1 For read CSV file in default directory.
get iris.csv@;


push table button to show readed data

view input data

//regression 3D reg PetalL by SepalL SepalW; //read output of regression 3D. get freq@ana; //view plot of regression of 3D. plot reg;

//Example 2 For read common CSV file in some directory. //To read the data in some directory, define project name by prj command as follow. //There is CSV file in "c:\temp\vote.csv" as example. //Define project name. prj tst "c:\temp"; //Read common CSV file in projct directory. get vote.csv@tst/ title=dmy ;

Input data is ancate of Yes/No for USA party

//Tree analysis for distinction of USA party by ancate answers. tree dmy_17 by dmy_1 - 16/ target/democrat,republican terminal=5 ;

push analysis button to show output

View tree analysis. This show ancate no.4 is most discriminative.

// //Example 3 Read tempory file // //generate 1000 record by outrec command as follows. clear; for(i=0;i<1000;i++) { x=ranstd(0,100); outrec; } //save temporaly file named work. put work; //read temporaly file without project mark '@'. get work; //View histgram plot hist x;