Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(MASS)
- library(ggplot2) # used for plotting, otherwise, it's optional
- Sigma <- matrix(c(10,3,3,2),2,2)
- var(mvrnorm(n = 1000, rep(0, 2), Sigma))
- example <- mvrnorm(n = 1000, rep(0, 2), Sigma)
- examplePlot <- qplot(example[,1], example[,2]) +
- xlab(expression(x[1])) +
- ylab(expression(x[2]))
- ggsave("examplePlot.jpg", examplePlot, width = 4, height = 4)
- write.csv(x = example, file = "example.csv", row.names = FALSE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement