peek | R Documentation |
peek at the results in a dplyr pipeline
peek(df, n = 5, message = NULL)
df |
dataframe in pipeline |
n |
number of rows to show |
message |
give a message along with peeking at the data |
A wrapper around giving a head
and tail
command
but only as a side effect so the original data frame is passed
along to continue on for furthermanipulation in the pipeline
library(dplyr) Theoph %>% select(Subject, Time, conc) %>% peek %>% group_by(Subject) %>% summarize(cmax = max(conc)) Theoph %>% select(Subject, Time, conc) %>% peek(message = "after select") %>% group_by(Subject) %>% summarize(cmax = max(conc)) # nice for saving full objects but still seeing their output cmax_theoph <- Theoph %>% select(Subject, Time, conc) %>% peek(message = "after select") %>% group_by(Subject) %>% summarize(cmax = max(conc)) %>% peek cmax_theoph # still saves full output
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.