Last active
May 3, 2019 07:41
-
-
Save akshat3096/a5d1e87046bf6a50ca1e2539685b687a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heart_rate <- df %>% | |
filter(type == 'HKQuantityTypeIdentifierHeartRate') %>% | |
group_by(date,year,month) %>% | |
summarize(heart_rate=median(value))+ | |
xlab("Month/Year") | |
heart_rate$date <- as.Date(heart_rate$date,"%Y-%m-%d") | |
plot <- ggplot(heart_rate,aes(x=date, y=heart_rate, group=year)) + | |
geom_line(aes(colour=year))+ | |
ggtitle("Median heartrate")+ | |
xlab("Month/Year") | |
plot+ | |
scale_x_date(date_labels = "%b/%Y") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment