Skip to content
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

Jingru Zhang-class-activity-2 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jzangela
Copy link

@jzangela jzangela commented Oct 1, 2019

Jingru Zhang-class-activity-2

@jzangela
Copy link
Author

jzangela commented Oct 1, 2019

Dear Aidi, Anna and Professor Lang,

Thank you for the class and I look forward to your comments and suggestions.

Best regards,
Jingru Zhang

@lizarova777
Copy link

Hi Jingru, can you upload the RMardown (.Rmd) file as well?

@jzangela
Copy link
Author

jzangela commented Oct 1, 2019

Hi Anna,

I have uploaded my file in Rmarkdown. Thank you so much for your comments and suggestions.

Best regards,
Jingru Zhang

@jzangela
Copy link
Author

jzangela commented Oct 1, 2019 via email

SD1 <- data.frame(
score = round(rnorm(pmin(100:1, 100), 75, 8)),
groups = sample(c("sport", "music", "nature", "literature"),
size = 4, replace = FALSE, prob = NULL))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try changing the size from 4 to a 100 and set replace to TRUE to randomize


```


8. R contains several inbuilt data sets, one of these in called AirPassengers. Plot a line graph of the the airline passengers over time using this data set.

```{r}

plot(AirPassengers,xlab="Date", ylab = "Passenger numbers (1000's)",main="Air Passenger numbers from 1949 to 1961")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use plot.ts().

iris
SD4 <- iris[, 1:4]
pairs(SD4)
# Relationships between Sepal.Length and Petal.Length, Sepal.Length and Petal.Width, Petal.Length and Petal.Width are appropraiet to run correlations on.
```

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants