-
Notifications
You must be signed in to change notification settings - Fork 79
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
Create print.one_skim_df, document reassign_skim_attrs and modify re… #703
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -62,6 +62,27 @@ print.skim_df <- function(x, | |||
} | ||||
} | ||||
|
||||
#' @export | ||||
print.one_skim_df <- function(x, | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have a summary method for a one_skim_df. Can we remove the logic for the summary and instead have this?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I took the logic of Line 38 in 562b753
but took out the purrr. I'm not sure but now that we are not silently getting the warning it may be that other parts are getting hit in new ways. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe just make |
||||
include_summary = TRUE, | ||||
n = Inf, | ||||
width = Inf, | ||||
summary_rule_width = getOption( | ||||
"skimr_summary_rule_width", | ||||
default = 40 | ||||
), | ||||
...) { | ||||
if (is_skim_df(x) && nrow(x) > 0) { | ||||
if (include_summary) { | ||||
print(summary(x), .summary_rule_width = summary_rule_width, ...) | ||||
} | ||||
|
||||
print(x, width = width, n = n, ...) | ||||
} else { | ||||
NextMethod("print") | ||||
} | ||||
} | ||||
|
||||
# Methods for correctly formatting a a `one_skim_df`. We leverage the | ||||
# customiztion options in `pillar` for this. It divides the results into: a | ||||
# header, which we customize; a body, where we strip some values; and a footer, | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this change accomplishes anything. For one, I don't see a documentation file generated to match this function. That's a good thing. Documenting this function (removing the noRd tag) is an issue because it is not exported.
Do you mind reverting this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what is causing one of the errors when it builds.