Submission of my class-activity-2 assignment.#2
Open
taylormwang wants to merge 1 commit intocore-methods-in-edm:masterfrom
Open
Submission of my class-activity-2 assignment.#2taylormwang wants to merge 1 commit intocore-methods-in-edm:masterfrom
taylormwang wants to merge 1 commit intocore-methods-in-edm:masterfrom
Conversation
Student: Minruo Wang UNI: mw3399
lizarova777
reviewed
Sep 29, 2019
| StudentScores <- runif(100, min = 1, max = 100) | ||
| #pmax sets a maximum value, pmin sets a minimum value | ||
| StudentScores <- pmax(1, StudentScores) | ||
| StudentScores <- pmin(100, StudentScores) |
There was a problem hiding this comment.
There is an another way of setting maximum and minimum values with a single line of code. round(pmax(1, pmin(100, rnorm(100, 75, 20))))
lizarova777
reviewed
Sep 29, 2019
| #sample draws a random samples from the groups vector according to a uniform distribution | ||
| StudentScores <- round(StudentScores, digits = 0) | ||
|
|
||
| InterestGroups <- c("sport", "music", "nature", "literature") |
There was a problem hiding this comment.
InterestGroups should be randomized as well. You can use sample()
lizarova777
reviewed
Sep 29, 2019
| ```{r boxplot} | ||
| #Make a vector of the colors from RColorBrewer | ||
|
|
||
| library(ggplot2) |
There was a problem hiding this comment.
Great job on using ggplot! You can also use boxplot()
lizarova777
reviewed
Sep 29, 2019
|
|
||
| ```{r correlation test} | ||
| # Correlation tests using Pearson | ||
| cor.test(iris$Sepal.Length, iris$Sepal.Width, method = "pearson", use = "complete.obs") |
lizarova777
reviewed
Sep 29, 2019
|
|
||
| ##### 10. Finally use the knitr function to generate an html document from your work. If you have time, try to change some of the output using different commands from the RMarkdown cheat sheet. | ||
|
|
||
| ##### 11. Commit, Push and Pull Request your work back to the main branch of the repository |
There was a problem hiding this comment.
Excellent work overall! Try rendering your RMarkdown file into an HTML document.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Student: Minruo Wang
UNI: mw3399
Assignment: HUDK4050 class-activity-2
Looking forward to your feedbacks & solutions!