Data Science Desktop Survival Guide
by Graham Williams |
|||||
Pipes: Tee Pipe Intermediate Results |
ds %>%
select(rainfall, min_temp, max_temp, sunshine) %>% filter(rainfall==0) %T>% {assign("tmp", ., globalenv())} %>% select(min_temp, max_temp, sunshine) %>% summary()
We can now access the variable tmp: |
print(tmp)
Notice the use of the curly braces for the first path of the tee-pipe. This allows us to reference the data from the pipeline as the period (.). |