You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
403 B
21 lines
403 B
setwd("mywd") |
|
# Libraries |
|
library(ggplot2) |
|
library(dplyr) |
|
library(hrbrthemes) |
|
library(viridis) |
|
|
|
|
|
studentName <- "mystudent" |
|
|
|
|
|
amount <- rowSums(df[grep(studentName, names(df))]) # write sum of rows i n amount |
|
|
|
# Plot |
|
ggplot(df, aes(x=times, y=amount)) + |
|
geom_line() + |
|
scale_color_viridis(discrete = TRUE) + |
|
ggtitle("mytitle", studentName) + |
|
theme_ipsum() + |
|
ylab("myyaxis") + |
|
xlab("myxaxis")
|
|
|