I have a piece of code where I update the class of the object. But I have to break the follow of the code to assign the class. Is there an elegant to to assign the class but continue the pipe so I have one pipe all the way to the final result? I suspect there might be something in {purrr}?
library(disk.frame)
library(dplyr)
library(tidyquery)
a = nycflights13::airports %>%
as.disk.frame
class(a) <- c(class(a), "data.frame")
a %>%
query("SELECT name, lat, lon ORDER BY lat DESC LIMIT 5")