19.08.2015 Views

1 - Intro to R Outline

1 - Intro to R Outline

1 - Intro to R Outline

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Extracting parts• x$variable• x[, “variable”]• x[rows, columns]# rows, columns are# indices• x[1:5, 2:3]• x[c(1,5,6), c(“sex”,“tip”)]• x$variable[rows]33Your Turn• Calculate basic summary stats for the variables.• Create a variable for Tipping Rate• Find the mean bill amount for each gender• Are there any unusual points?••Explore the data. Can you find any interesting trends?How many people in this data tipped tipped greaterthan 20% of their bill?34

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

Saved successfully!

Ooh no, something went wrong!