Week 17- R studio Flashcards
How do you set the x-axis limits and what is the function of doing so
(((add to end of your ggplot calculation)))
xlim(0,40) +
geom_vline(xintercept = mean(studytwo$SHIPLEY), colour = “red”, size = 1.5)
Editing the appearance of the plot- alpha, size, colour, shape, theme, labels
ggplot(data = studytwo, aes(x = SHIPLEY, y = mean.acc)) +
geom_point(alpha = 0.5, size = 2, colour = “purple”, shape = ‘triangle’)
theme_bw() +
labs(x = “Vocabulary(SHIPLEY)”, y = “Mean accuracy”)
Setting x-axis and y-axis limits to the minimum-maximum ranges
ggplot(data = studytwo, aes(x = SHIPLEY, y = mean.acc)) +
geom_point(alpha = 0.5, size = 2, colour = “purple”, shape = ‘star’) +
theme_bw() +
labs(x = “Vocabulary(SHIPLEY)”, y = “Mean accuracy”) +
xlim(0, 40) + ylim(0, 1)
Reminder on running correlations
cor.test(studytwo$mean.acc,
studytwo$HLVA,
method = ‘pearson’)