M01_IntroToR.pptx - Introduction to R Stephen Penn...

Info icon This preview shows pages 1–6. Sign up to view the full content.

Introduction to R Stephen Penn Harrisburg University September 19, 2015
Image of page 1

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

Installing R Go to Follow the link to CRAN Select a mirror site Download for your OS Each OS has distinct instructions…
Image of page 2
Interfaces for R Command Line – the default RStudio – available at , get the free version Rcommander – available at , has drop down menus Rattle – strictly data mining
Image of page 3

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

Math at the Command Line Basic operators - +, -, *, /, ^ Functions – date(), mean(), round(), help() Assignment Operator - Data Frames – hold data sets (tables) Each column is a vector (same data type) Each row is an observation
Image of page 4
Loading Data into R Dataset1 read.csv(“C:/mystatsdata/mysurvey.csv”) If your data is an Excel file, you can save it as a CSV then load it into R. Just make sure there are no merged cells or blank rows, are anything other than a simple table Or, you can key data in directly using the combine function c(), such as… Mydata <- c(0,1,2,3,4,5,6,7,8,9)
Image of page 5

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

Image of page 6
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '07
  • Staff

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern