Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty patchwork object #334

Closed
rerickson-usgs opened this issue Sep 20, 2023 · 1 comment
Closed

empty patchwork object #334

rerickson-usgs opened this issue Sep 20, 2023 · 1 comment

Comments

@rerickson-usgs
Copy link

I'm using a loop to go over data. How do I create an empty patchwork object

Let's say my loop looks like this:

df_save <- tibble()
for (idx in my_names){

    ## Do stuff ....
   out <- my_cool_function()

    df_save  <- df_save |> bind_rows(out)
} 

How would I do this with patchwork? I didn't find a way to create a patchwork object that I could add to in the documentation.

@thomasp85
Copy link
Owner

I would generally store the plots you create in a list and use wrap_plots() to turn them into a patchwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants