Material associated to
the book: Introduction to STATISTICS in a biological context (September, 2011) ISBN-10: 1463613377 by Edith Seier & Karl H. Joplin |
What to do with .txt (ANSI) data files? These are ANSI data files with the .txt extension. To be used with worksheet type software such as MINITAB: Open the file by clicking on it. Highlight, copy and paste the data into the spread sheet. To use them with R: If the file has just one column of data, create a data object using the command scan, for example: pulse<-scan('e:PULSERATE.txt') If the file has two or more columns of data, create a data object using the command read.table, for example: drugs<-read.table('e:DRUGSURV.txt',header=TRUE) the option header =TRUE reads the names of the variables in the first row of the file. The object created includes all the variables, if you want to work with each one of the variables separately, create objects with the columns, for example: gender<-drugs[1] age<-drugs[2] educ<-drugs[3] |
|
R-commands
R for MATH15030 Save these files as text files so that the quotes do not get changed since this can produce problems in R Once you locate the commands you want to use, highlight , copy and paste into R. Change the data in the first lines of the programs in order to use them with your own data. Chapters 1 & 2 Chapter 3 Chapters 4 &5 Chapters 7 & 9 Chapter 10 Chapter 11 Chapter 12 dataforR A text file with several data sets used in the book to be copied and pasted into R, we use the command <-c( , , , ) |
ANSI data sets (.txt or .dat) I Data sets (alphabetical order) with just one column of data: AGE Age of 503 respondents to a survey FLYLIFE Length of life in days for 200 female flies (Sarcophaga crasipalpis) onebeesu Activity of one bee under constant darkness during 6 days measured for each 10 minute interval (data: D. Moore Lab) PARROTSRBC Data on Table 2.2 Dry cell area of red blood cells for species in the Psittacidae family ( from http://www.genomesize.com/cellsize/ T.Ryan Gregory, 2003) PULSRATE Pulse rate of 210 students while sitting in an intro stats class REACTIONTIME18YF Reaction time for 18 female college students RHODODENDRON Length (cm) of 10 leaves from a rhododendron II Data sets (alphabetical order) with two or more columns: ALTITUDERBC Altitude of residence (ft) and million of red blood cells for 17 individuals (Spector, 1954,p.274) BIRDS20WN Typical values for several variables for 20 species of birds from the data base in Lislevand, Figuerola and Szkely (2007) BMD108 Age and bone mineral density in several bones for 108 women 50 years or older(4 lumbar locations, femoral neck and total hip) BRAIN Brain mass and logarithm of brain mass for 96 species of mammals (Ramsay & Schaffer, 1997) CHCH2014 Number of chocolate chips per cookie for two brands of cookie CHERRYJUICE10MALES Pressure in the knee endured by 10 males before and after treatment (Delk, 2009) CHERRYJUICE20 CHERRY JUICE VS PLACEBO Pressure in the knee endured by 20 males before and after treatment (Delk, 2009) CHICKENS-PHYTATE Amount of mucin in the excreta of 16 chickens (8 had phytate added to their diet) DRUGSURV Data from a survey (n=503): gender, age, years of education, ever a smoker?,smoking status, ever tried marijuana, alcohol dependent?, age group. FIVELEAVES Width, length, petiole length (cm) and mass(g) for leaves from 5 tree species. GREENHILL Age at time of death for 135 individuals buried in the Greenhill Cemetery, Laramie, Wyoming, HBBMI30 Hemoglobin and body mass index (BMI) for 30 women HBTRANSFUSION60 Preoperative hemoglobin for 60 women (30 needed transfusion and 30 did not, group=0 No, group=1 Yes) HEIGHTFOOTHAND Height, foot length and hand span for 23 females HENS Typical values for several variables for the females of species of the Phasianidae family from the data base in Lislevand, Figuerola and Szkely (2007) LYBII Typical values of several variables for the males of the species of the Lybiidae family, Lislevand, Figuerola and Szkely (2007) ONEGENE Intensity of one gene for 4 subtypes of tumor, from the Khan data set (Desper, Khan & Schaffer, 2004) ONEONION Length of 20 cells in the root of an onion (10 in each one of two regions) REACTION-DISTRACTION Reaction time under quiet and distraction conditions for 28 fifth graders (14 girls and 14 boys) SUGARMAPLE Width, length, petiole length, (in centimeters) and mass (g) for 20 leaves from sugar maple trees TEMPERATURESEA Monthly average temperature (Celsius) of the sea surface in Callao, Peru from 1956 to 1985, data from IMARPE |