Skip to content

Commit

Permalink
Develop to Master
Browse files Browse the repository at this point in the history
  • Loading branch information
elinw authored Jan 9, 2018
2 parents eff127b + 710cbf1 commit 55f67c8
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
8 changes: 5 additions & 3 deletions R/skim.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ globalVariables(".")
#' review the Using Skimr vignette for more information.
#'
#' @param .data A tbl, or an object that can be coerced into a tbl.
#' @param ... Additional options, normally used to list individual unquoted column names.
#' @param ... Additional options, normally used to list individual
#' unquoted column names.
#' @return A \code{skim_df} object, which can be treated like a
#' tbl in most instances.
#' @examples
Expand Down Expand Up @@ -70,7 +71,8 @@ skim.default <-function(.data, ...){
#' without modification
#'
#' @param .data A tbl, or an object that can be coerced into a tbl.
#' @param ... Additional options, normally used to list individual unquoted column names.
#' @param ... Additional options, normally used to list individual unquoted
#' column names.
#' @return The input data frame.
#' @export

Expand All @@ -82,7 +84,7 @@ skim_tee <- function(.data, ...) {
#' Print skim result and return a single wide data frame of summary statistics
#'
#' Returns a wide data frame with one row per variable and NA for statistics
#' not calculated for a given type. This faciliates future processing.
#' not calculated for a given type. This facilitates future processing.
#'
#' @param x A \code{dataframe}.
#' @param ... Further arguments passed to or from other methods.
Expand Down
2 changes: 1 addition & 1 deletion R/skimr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' object is subsettable and offers a human readable output.
#'
#' \code{skimr} is opinionated, providing a strong set of summary statistics
#' that are generated for a variety of differnt data types. It is also
#' that are generated for a variety of different data types. It is also
#' provides an API for customization. Users can change both the functions
#' dispatched and the way the results are formatted.
#'
Expand Down
13 changes: 9 additions & 4 deletions R/stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ n_complete <- function(x) {

#' Create a contingency table and arrange its levels in descending order
#'
#' In case of ties, the ordering of results is alphabetical and depends upon the locale.
#' In case of ties, the ordering of results is alphabetical and depends upon
#' the locale.
#' NA is treated as a ordinary value for sorting.
#'
#' @param x An object that can be interpreted as a factor (including logical)
Expand All @@ -49,8 +50,11 @@ sorted_count <- function(x) {

inline_hist <- function(x) {
# Handle empty and NA vectors
if (length(x) < 1|| all(is.na(x))) return(structure(" ", class = c("spark", "character")))

if (length(x) < 1|| all(is.na(x)))
{
return(structure(" ", class = c("spark", "character")))
}

# Addresses a known bug in cut()
if (all(x == 0)) x <- x + 1
hist_dt <- table(cut(x, options$formats$character$width))
Expand All @@ -61,7 +65,8 @@ inline_hist <- function(x) {

#' Draw a sparkline bar graph with unicode block characters
#'
#' Rendered using [block elements](https://en.wikipedia.org/wiki/Block_Elements).
#' Rendered using
#' [block elements](https://en.wikipedia.org/wiki/Block_Elements).
#' In most common fixed width fonts these are rendered wider than regular
#' characters which means they are not suitable if you need precise alignment.
#'
Expand Down
3 changes: 2 additions & 1 deletion man/skim.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/skim_tee.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/skim_to_wide.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/skimr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/sorted_count.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 55f67c8

Please sign in to comment.