Homework Problem 2, Due Wednesday February 6. --------------------------------------------- Either follow the course web-page links or directly access the (compressed) text data-file http://www.math.umd.edu/~evs/s798c/Data/exampfram.asc.gz (You may have to create a new ASCII data-file by copying from the browser window to a word-processor and saving the file `as text'.) (a) Create the data-frame "exampfram" consisting only of the columns IDNUM DTH EVTTIME TRTGP LOGBILI AGEVAR CIRRH from the indicated text data-file by using the "read.table" R function. Make sure that these column labels are the column names. In your resulting data frame, check whether the "class" values of the TRTGP and CIRRH columns are respectively "character" and "logical" and if not, change them to be this way. (When the data are first inputted by read.table, character columns are by default converted to something that we will study later called a "Factor".) (b) Create the same data-frame, this time called "exampfram2", by inputting the data as a giant vector using "scan" (after skipping the first header line, if you wish) and then doing Splus operations upon that vector. Make sure that the columns of this data-frame are all numeric except that the TRTGP column is character-type and CIRRH is Boolean, i.e., "logical". To achieve this you will have to make a character matrix into a data-frame, and then redefine the types" of the columns using R functions like as.numeric() and as.logical(). (c) Show that your two data-frames in (a) and (c) are identical. (d) Create and display a matrix whose first column is the vector of minima of the numeric variables in `exampfram' and whose second column is the corresponding vector of maximum values.