knitr::opts_chunk$set( message = FALSE, warning = FALSE, collapse = TRUE, error = TRUE, comment = "#>" )
library(tidyverse) library(staroddi) dst <- read_dst(system.file("demos/1M9380.DAT", package="staroddi"))
dst %>% select(time, Temperature = temp, Depth = depth) %>% gather(var, val, -time) %>% drop_na() %>% ggplot(aes(time, val)) + theme_bw(base_size = 16) + geom_point(size = 0.01) + facet_grid(var ~ ., scales = "free_y") + labs(x = NULL, y = NULL)
dst %>% select(time, Temperature = temp, Depth = depth) %>% gather(var, val, -time) %>% drop_na() %>% arrange(time) %>% group_by(var) %>% mutate(dt = difftime(lead(time), time, units = "mins"), dt = as.numeric(dt)) %>% count(dt) %>% drop_na() %>% knitr::kable(caption = "Frequency of recorded time steps [minutes]")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.