This is a sample assignment that will also include for loops, functions, and map.
R Programming Assignment Question #1 1. Load the datasets “pokemon_kanto”, “pokemon_johnto”, “pokemon_hoennplus” and bind them together 2. Clean the names of the dataset (note; you have to save the version with the clean names) 3. Filter out all those “Mega” Pokemon (they have a “Mega” in their name), but keep those “legendary” pokemon. 4. Load the dataset “pokemon_types” and merge it using their “id” number. Make sure that you are not duplicating columns Question #2 At this stage, you can start an exploratory data analysis with this tidy dataset. Moving forward we will be using the cleaned dataset you created in question 1. 1. Create a table to summarize the number of pokemon in each generation. Which generation has the most amount of pokemon? (Tip: you can use n() to get the counts) 2. Create a table using summarize and group_by() and find which generation has the most amount of legendary pokemon? 3. How many different types of pokemon are there? (such as ground, water, etc.) 4. Using gtsummary() create a table to summarize the pokemon’s battle statistics (Total, Hp, Attack, Defense, Sp Attack, Sp Defense, Speed) by type. Make sure to include the mean and the standard deviation for each one. 5. Expand the table you created in 2.3 and include total counts for each pokemon type, an “overall” column that summaries of the statistics across all pokemon. Question #3 1. Generate a ridge plot that shows the distribution of “Attack” across each of the different generations. Write a 3 sentence summary of what you see. Are there any differences in the distributions across generations? 2. Now let’s explore 2.3 and 2.4 graphically. Visualize the distribution of the “Total” battle statistic across the different pokemon types. While you could pick different kinds of plots, we want you to pick a plot that displays the median. From your plot, do you see any differences across the types? Write a 3 sentence summary of what you see. 3. Now explore the relationship between “Attack” and “Sp Attack”, can you plot these two variables together? Please include a smoother that indicates the trend between the two. Can you facet the plots based on whether or not the pokemon are legendary? Note this is an example assignment. The next assignment will include: For Loops, functions, and the map function () R Programming Assignment Question #1 1. Load the datasets “pokemon_kanto”, “pokemon_johnto”, “pokemon_hoennplus” and bind them together 2. Clean the names of the dataset (note; you have to save the version with the clean names) 3. Filter out all those “Mega” Pokemon (they have a “Mega” in their name), but keep those “legendary” pokemon. 4. Load the dataset “pokemon_types” and merge it using their “id” number. Make sure that you are not duplicating columns Question #2 At this stage, you can start an exploratory data analysis with this tidy dataset. Moving forward we will be using the cleaned dataset you created in question 1. 1. Create a table to summarize the number of pokemon in each generation. Which generation has the most amount of pokemon? (Tip: you can use n() to get the counts) 2. Create a table using summarize and group_by() and find which generation has the most amount of legendary pokemon? 3. How many different types of pokemon are there? (such as ground, water, etc.) 4. Using gtsummary() create a table to summarize the pokemon’s battle statistics (Total, Hp, Attack, Defense, Sp Attack, Sp Defense, Speed) by type. Make sure to include the mean and the standard deviation for each one. 5. Expand the table you created in 2.3 and include total counts for each pokemon type, an “overall” column that summaries of the statistics across all pokemon. Question #3 1. Generate a ridge plot that shows the distribution of “Attack” across each of the different generations. Write a 3 sentence summary of what you see. Are there any differences in the distributions across generations? 2. Now let’s explore 2.3 and 2.4 graphically. Visualize the distribution of the “Total” battle statistic across the different pokemon types. While you could pick different kinds of plots, we want you to pick a plot that displays the median. From your plot, do you see any differences across the types? Write a 3 sentence summary of what you see. 3. Now explore the relationship between “Attack” and “Sp Attack”, can you plot these two variables together? Please include a smoother that indicates the trend between the two. Can you facet the plots based on whether or not the pokemon are legendary? Note this is an example assignment. The next assignment will include: For Loops, functions, and the map function ()