Lab3.Rmd - -title"Lab 3 author"Yue tan date"`r...

  • No School
  • AA 1
  • 3

This preview shows page 1 - 2 out of 3 pages.

--- title: "Lab 3" author: "Yue tan" date: "`r Sys.Date(3.11.2019)`" output: word_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Dataset: 350 students were given a short questionnaire about their perception of parking space available on campus. The participants were first asked demographic information: a) Gender b) Class level (freshman, sophomore, junior, senior) Next, participants were asked to indicate their opinion on three questions on parking lot space a 1-7 likert-type scale (1 = strongly disagree, 7 = strongly agree). a) I always drive to campus. b) I spend several minutes each day looking for parking. c) I think MSU should build additional parking. ```{r starting} setwd('C:\\Users\\karentan\\Desktop\\Work\\HU\\500\\Lab3-20190311') parkingspace=read.csv('Lab3.csv') ``` # Data screening: ## Accuracy: a) Include output and indicate how the data are not accurate. b) Include output to show how you fixed the accuracy errors, and describe what you did. ```{r accuracy} #what is wrong with the data? #what do you notice that is off with the data? (aka dirty data issues) table(parkingspace$Gender) table(parkingspace$Class) table(parkingspace$Q1) table(parkingspace$Q2) table(parkingspace$Q3) notypos=parkingspace notypos$Gender=factor(notypos$Gender,levels=c('Male','Female'),labels=c('Male',' Female')) notypos$Class=factor(notypos$Class,levels=c(1,2,3,4),labels=c('freshman', 'sophomore', 'junior', 'senior')) notypos$Q1=factor(notypos$Q1,levels=c(1:7),labels=c(1:7))
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Fall '19

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes