Computer Code-3 HW3 HW 3: R introduction For our third HW, we will take our knowledge of logic into the field of data analysis. We will use a data analysis

Click here to Order a Custom answer to this Question from our writers. It’s fast and plagiarism-free.

HW3

HW 3: R introduction

For our third HW, we will take our knowledge of logic into the field of data analysis. We will use a data analysis programming language called R.



Setup

Please use the same RStudio Cloud project with your existing code. (https://rstudio.cloud/content/yours?sort=name_asc)


Tasks

Complete the line 212-306.


Assumptions, clarifications, and hints

1. You will need the penguins data set for the last section on visualization. This data set is built into R. After you run the library(palmerpenguins) line, access the penguins data set by using penguins, ex:
penguins %>%

2. Use alpha of 0.2 in the last question.





### c)

Show the mean height and mass of humans.

#### i)

“`{r}

“`

#### ii)

Show the mean height and mass of humans grouped by sex.

“`{r}

“`

### d)

Get the 2 shortest masculine and feminine characters, displaying only name, height and gender columns (you must remove missing values for gender).

“`{r}

“`

# Data Visualization

Base R has its own plotting utilities, but they are rarely for creating presentable visualizations as they are difficult to configure and do not have consistent behavior for different plot types. We will be using the ggplot2 package, which is the industry standard for data visualization as it uses a consistent ‘grammar’ to construct all types of visualizations, produces high quality outputs by default and is easy to configure.

We will also be using the palmerpenguins educational data package for the data underlying our plots.

Run the code block below.

“`{r}

library(palmerpenguins)

“`

## Q1)

### a)

Create a scatter plot with bill depth on the x axis and body mass on the y axis.

“`{r}

“`

### b)

Color this scatter plot by species.

“`{r}

“`

### c)

Add an appropriate human-readable title, along with axis and legend labels.

“`{r}

“`

## Q2

Construct a filled bar chart of species, filled by island.

“`{r}

“`

## Q3

### a)

Construct a histogram of flipper length.

“`{r}

“`

### b)

Facet this histogram by species

“`{r}

“`

### c)

Compare the flipper length distributions between different species using density geom with an alpha.

“`{r}

“`

Place your order now for a similar assignment and have exceptional work written by one of our experts, guaranteeing you an A result.

Need an Essay Written?

This sample is available to anyone. If you want a unique paper order it from one of our professional writers.

Get help with your academic paper right away

Quality & Timely Delivery

Free Editing & Plagiarism Check

Security, Privacy & Confidentiality