Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

### Problem 1 title \"R Notebook\" a) & b) output: html_notebook --- This is an

ID: 3598437 • Letter: #

Question

### Problem 1 title "R Notebook" a) & b)
output: html_notebook
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.

## Homework 2 Review of Descriptive statistics and Correlation

### Problem 1
The dataset $USStates$ examines the percent of adults to graduate college in US states by region. The dataset also includes information on the percent to graduate high school in each state.

a) Import the dataset $USStates$ from the textbook website and do a preliminary analysis of the content of it. Additionally, identify which variables might be considered categorical and which ones nnumerical or quantitative?

```{r}
# Insert R code here

```

b) Compute the correlation coefficient and draw the scattered plot including $Household Income$ as the explanatory variable and $College$ as the response variable. Is there a linear trend? Is it positive or negative? Are there any really obvious outlier?

```{r}
# Insert R code here

```

Explanation / Answer

ifndef dstudentList_hpp

#define dstudentList_hpp

#include <iostream>

#include "dstudentNode.h"

struct dstudentList {

dstudentList();

  

void display();

void prepend(dstudentNode* node);

void prepend(const std::string& lname, const std::string& fname, float gpa, int cwid);

  

void append(dstudentNode* node);

void append(const std::string& lname, const std::string& fname, float gpa, int cwid);

  

void insertAt(size_t index, dstudentNode* node);

void insertAt(size_t index, const std::string& lname, const std::string& fname, float gpa, int cwid);

  

void deleteAll();

void deleteAt(size_t index);

void popfront();

void popback();

dstudentNode* front();

dstudentNode* back();

void rotateLeft(size_t n);

void rotateRight(size_t n);

void swap(dstudentNode*& p, dstudentNode*& q);

void reverse();

void write(const std::string& filename);

void read(const std::string& filename);

static void test();

  

  

dstudentNode* head_;

dstudentNode* tail_;

size_t size_;

};

#endif /* dstudentList_hpp */

//

// convertLists.h

// studentlist

#ifndef convertLists_h

#define convertLists_h

#include <iostream>

#include "studentList.h"

#include "dstudentList.h"

void convertSingle_toDouble(const studentList& sli, dstudentList& dli);

void convertDouble_toSingle(const dstudentList& dli, studentList& sli);

#endif /* convertLists_h */

//

// read_hints.cpp

// studentListClasses

//

// Created by William McCarthy on 10/19/17.

// Copyright © 2017 William McCarthy. All rights reserved.

//

//#include <fstream>

//

//// in student.h, *inside* the student class ============================================

////...

//friend std::istream& operator>>(std::istream& is, student& st);

////...

//

//// in student.cpp -- it's an istream operator ============================================

//std::istream& operator>>(std::istream& is, student& st) {

// std::string gpa, cwid;

// is >> st.lname_ >> st.fname_ >> st.gpa_ >> st.cwid_;

// is.ignore();

//

// return is;

//}

//

//// in studentList.cpp ============================================

//void studentList::read(const std::string& filename) {

// std::ifstream ifs;

// ifs.open(filename, std::ifstream::in);

//

// student st;

// while (ifs.peek() != EOF) {

// ifs >> st;

// std::cout << " read back from file: " << st;

// append(new studentNode(st));

// }

// ifs.close();

//}