Question: solve all ` ` ` { r setup, include = FALSE } knitr::opts _ chunk$set ( echo = TRUE ) ` ` ` ### Instructions

solve all
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### Instructions
1. This is an R Markdown format used for publishing markdown documents to GitHub. When you click the **Knit** button, all R code chunks are run and a markdown file (.md) suitable for publishing to GitHub is generated.
2. Fill in the code chunks for following question and submit this R markdown file to the assignment on Canvas. Make sure when you save that you have run all cells, so the outputs displace between the cells.
3. Solo work, open book & open notes - This part of the exam is open book, open notes. You may use the textbook, your own notes, and any pre-existing resources. You must not use communicate with others - in person, using online forums, social media, Slack, WeChat, GroupMe, etc. If you have concerns, contact me directly so I can advise you.
4. Partial credit - If you can't get your code to work 100% correctly, you can often earn partial credit. To get partial credit you need to show that you know there is a problem and describe it. The better you can describe the problem, the more partial credit you can earn, because it helps demonstrate your knowledge and skill. Please provide your description outside of the code chunk.
5. Make sure you can have a successful knit of the document, and have a screenshot of your knitted file.
### Q1.(5pts) Create a vector containing all the positive odd numbers smaller than 100.
```{r}
```
### Q2.(3pts) Create a matrix of 4 rows and 3 columns with random numbers. (2pts) Get the 1st and 4th row from the matrix.
```{r}
```
### Q3.(5pts) Create a function sum_n that for any given value, say n, computes the sum of the integers from 1 to n (inclusive). Use the function to determine the sum of integers from 1 to 500.
```{r}
```
### Q4.(5pts) Create a dataframe with two columns: 'Name' (chr), 'Score' (numeric), containing 5 rows of data.
```{r}
```
### Q5.(5pts) Write a function compute_s_n that for any given n computes the sum S(n)=1^2+2^2+...+n^2.
```{r}
```
### Q6.(5pts) Download the 'HousePrice-exam.csv'. Read the file and import the data to a data frame 'house_df'.
```{r}
```
### Q7.(5pts) Add a new column 'price_per_sqft' to house_df, it is computed as Price/Sqft_Area.
```{r}
```
### Q8.(5pts) What is the median price (Price) of hourses in zipcode area 98118(Check the column Postal)?
```{r}
```
### Q9.(5pts) Get a subset of houses that were built after 2000(check the column Built_Year).
```{r}
```
### Q10.(5pts) What is the price of the most expensive house in the dataset? (5pts) What is the Property_Address of the most expensive house?
```{r}
```
### Q11.(5pts) Design a question with the house_df data: the question will use both "mutate" and "filter" from the tidyverse package. (5pts) Write code to answer your question.
#### Write your question here:
```{r}
```
### Q12.(5pts) Design a question with the house_df data: the question will use both "group_by" and "summarize" from the tidyverse package. (5pts) Write code to answer your question.
#### Write your question here:
```{r}
```
### Q13.(5pts) Design a question with the house_df data: the question will use both "arrange" from the tidyverse package. (5pts) Write code to answer your question.
#### Write your question here:
```{r}
```
### Q14.(15pts) How many houses have Zestimate price higher than sold price. (Hint: You need to convert Zestimate to a numeric value first, e.g.,278K ->278000, then you can compare Price with Zestimate)
```{r}
```

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!