|
|
|
|
|
by wodenokoto
392 days ago
|
|
We all have different definitions on what is difficult. Maybe annoying or bothersome had been better words, but below beats nesting things: df |> select(..) |>
filter(...) |>
mutate(...) |>
...
And every time I've learned something about the intermediate result I can add another line, or save the result in a new variable and branch my exploration. And I can easily just highlight and run and number of of steps from step 1 onwards.Even oldschool df2 <- df[...]
df2 <- df2[...]
Gives me the same benefit. |
|
But sometimes I just happen to have just imported a data set in a SQL client or I'm hooked into a remote database where I don't have anything but the SQL client. When developing an involved analysis query nesting also comes in handy sometimes, e.g. to mock away a part of the full query.