if (getRversion() >= "4.1.0" && require("dplyr")) {
# Print summary before assigning model to variable
m <- lm( speed ~ dist, cars) |>
zprint(summary) # prints summary(x)
m # m is the original model object
# Print grouped data before filtering original
cw_subset <- chickwts |>
zprint(count, feed, sort=TRUE) |> # prints counts by feed
filter(feed=="soybean")
cw_subset # cw_subset is ungrouped, but filtered by feed
}
Run the code above in your browser using DataLab