-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submission of my class-activity-2 assignment. #2
base: master
Are you sure you want to change the base?
Conversation
Student: Minruo Wang UNI: mw3399
#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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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))))
|
||
InterestGroups <- c("sport", "music", "nature", "literature") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InterestGroups should be randomized as well. You can use sample()
#Make a vector of the colors from RColorBrewer | ||
|
||
library(ggplot2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on using ggplot
! You can also use boxplot()
|
||
```{r correlation test} | ||
# Correlation tests using Pearson | ||
cor.test(iris$Sepal.Length, iris$Sepal.Width, method = "pearson", use = "complete.obs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job on using the cor.test()
!
|
||
##### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work overall! Try rendering your RMarkdown file into an HTML document.
Student: Minruo Wang
UNI: mw3399
Assignment: HUDK4050 class-activity-2
Looking forward to your feedbacks & solutions!