scatterR - # Demonstrate reading and attaching a dataset. #...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #### Demonstrate reading and attaching a dataset. #### Demonstrate scatterplots, correlation coefficients and #### least squares lines to study #### the association between two variables. # First go the the R file menu, pull down "Change dir. ." and # browse to the folder with the data. # Check that you correctly changed the working directory to that folder: getwd() # read the data - it's in comma separated value format braindata = read.csv("brain.csv") names(braindata) # make the variables in the data available: attach(braindata) ######################### scatterplots and correlation # Scatterplot of raw data plot(bodykg, braing) cor(bodykg, braing) # this graph is difficult to judge due to the extreme scale # the correlation value is high but due to a couple of extreme species
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

scatterR - # Demonstrate reading and attaching a dataset. #...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online