-
Notifications
You must be signed in to change notification settings - Fork 80
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
as.list
method for use with writexl::write_xlsx
#665
Comments
Thanks for the suggestion! We handle a lot of this within reshape.R. Have a look: We could expand partition with an argument @elinw, what do you think? |
I was thinking about this. I think that if the goal is to add the summary as an element of the list specifically for the purpose of being able to write it to an Excel file I think it's better to start with that idea rather than starting with the solution of putting summary into a list with everything else. We should think about what the general use case for a list of skim objects would be. First, there are other packages that support writing to Excel files (e.g. openxlsx) so we should try to be general enough to support all of them. Second, in terms of data, just one thought, why is it that we would put summary in the same sheet with everything else? Maybe it would make more sense to default to one partition per worksheet and then put the summary on its own sheet. It might make sense even to have two different methods, |
Yes @elinw I would really like a generic for this too from other packages. Should we
Then we could make changes on our side as well to accommodate this. |
Because we are talking about lists of skimmed objects ere we should also be conscious of any interaction with purrr #671 and print. |
This actually works fine for me:
I that would work for opensxl::write.xlsx but it expects data frames. |
Okay actually ... the list is
|
@michaelquinn32 Are you fine with adding the "list" class in a second slot of skim_list objects? Do you see any downside? |
FWICT, reading and writing with I don't think we need to inherit from a list with a iris %>%
skim() %>%
partition() %>%
is.list()
#> TRUE One change I would like to see, though, is for the updated summaries to be included as a frame in the |
But for |
We should open a bug with
There also seems to be an issue with the output that they're writing. Instead of preserving the list structure from |
It's also worth nothing that
https://stat.ethz.ch/R-manual/R-devel/library/base/html/class.html |
Okay so it's almost a year later. The good think is that I tried openxlsx with partition and it works so that is one problem taken care of. The issues I see are
|
Just one update on this which is that openxlsx2 now exists and is more tidyverse focused. |
Hi everyone, thank so much for this package.
I want to know your opinion about implement a
as.list
or similar for theskim_df
class.For example the next function transform a
skim_df
object into a list so you can export all elements (partition(x)
) to a excel fileusing
writexl::write_xlsx
. And have something like this:Created on 2021-06-02 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: