Skip to content

Commit

Permalink
Merge pull request #419 from ropensci/develop
Browse files Browse the repository at this point in the history
Standing PR Develop to Master
  • Loading branch information
elinw committed Apr 1, 2019
2 parents cb7c34a + 4b5bf79 commit 9bdca0f
Show file tree
Hide file tree
Showing 24 changed files with 147 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^docs$
^_pkgdown\.yml$
^.*\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
skimr.Rproj
inst/doc
.DS_Store
docs/
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ before_install:
- echo "options(repos = c(CRAN='http://cran.rstudio.com'))" > ~/.Rprofile
r_github_packages:
- jimhester/covr

after_success:
- Rscript -e 'covr::codecov(line_exclusions = list("R/skim_print.R" = c(147, 167, 178:180, 190)))'
before_cache:
- Rscript -e 'remotes::install_cran("pkgdown"); remotes::install_github("ropenscilabs/rotemplate")'
deploy:
provider: script
script: Rscript -e 'pkgdown::deploy_site_github()'
skip_cleanup: true
on:
tags: true
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: skimr
Title: Compact and Flexible Summaries of Data
Version: 1.0.5
Version: 1.0.6
Authors@R: c(
person("Amelia", "McNamara", email="amcnamara@smith.edu", role = "aut"),
person("Eduardo", "Arino de la Rubia", email="earino@gmail.com", role = "aut"),
Expand All @@ -20,7 +20,8 @@ Authors@R: c(
person("Mikko", "Korpela", email="mvkorpel@iki.fi", role='ctb'),
person("Jennifer", "Thompson", email="thompson.jennifer@gmail.com", role='ctb'),
person("Harris", "McGehee", email="mcgehee.harris@gmail.com", role='ctb'),
person("Patrick", "Kennedy", email="pkqstr@protonmail.com", role='ctb')
person("Patrick", "Kennedy", email="pkqstr@protonmail.com", role='ctb'),
person("Daniel", "Possenriede", email="possenriede@gmail.com", role='ctb')
)
Description: A simple to use summary function that can be used with pipes
and displays nicely in the console. The default summary statistics may be
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
skimr 1.0.6 (xxx-xx-xx)
=======================
### BUG FIXES
* Fix issue where skim_tee() was not respecting ... options.
* Fix issue where all NA character vectors were not returning NA for
max() and min()

skimr 1.0.5 (2019-01-05)
========================
Expand Down
2 changes: 1 addition & 1 deletion R/skim.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ skim.default <-function(.data, ...){
#' @export

skim_tee <- function(.data, ...) {
print(skim(.data))
print(skim(.data, ...))
invisible(.data)
}
2 changes: 2 additions & 0 deletions R/stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ n_empty <- function(x) {
#' @export

min_char <- function(x) {
if(all(is.na(x))) return(NA)
characters <- nchar(x, allowNA = TRUE)
min(characters, na.rm = TRUE)
}
Expand All @@ -145,6 +146,7 @@ min_char <- function(x) {
#' @export

max_char <- function(x) {
if(all(is.na(x))) return(NA)
characters <- nchar(x, allowNA = TRUE)
max(characters, na.rm = TRUE)
}
Expand Down
31 changes: 23 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output:
md_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# skimr <img src="inst/figures/skimmer_hex.png" align="right" height="139" />
# skimr <img src="man/figures/logo.png" align="right" height="139" />
```{r set-options, echo=FALSE, message=FALSE}
library(pander)
library(knitr)
Expand All @@ -26,13 +26,17 @@ be included in a pipeline or displayed nicely for the human reader.

## Installation

The current released version of <cite>skimr</cite> can be installed from CRAN. If you wish
to install the current build of the next release you can do so using the
Version 2 of skimr is under very active development and near release. Version 1 is
only receiving updates for significant issues. We recommend that new users
interested in the development version consider installing the v-2 branch.

The current released version of <cite>skimr</cite> can be installed from CRAN.
If you wish to install the current build of the next release you can do so using the
following:

``` r
# install.packages("devtools")
devtools::install_github("ropenscilabs/skimr")
devtools::install_github("ropensci/skimr")
```
The APIs for this branch should be considered reasonably stable but still
subject to change if an issue is discovered.
Expand All @@ -43,18 +47,25 @@ incorporated in the master branch (and may not be):
``` r
devtools::install_github("ropenscilabs/skimr", ref = "develop")
```
Do not rely on APIs from the develop branch.
Do not rely on APIs from the develop branch.

The v-2 branch is the equivalent to the develop branch for Version 2. While subject
to change, we consider the APIs to be those that will be part of the version 2 release.
Please visit the issue tracker for more extensive information about version 2.

## Skim statistics in the console

<cite>skimr</cite>:

- Provides a larger set of statistics than `summary()`, including missing,
complete, n, and sd.
- reports each data types separately
- reports each data type separately.
- handles dates, logicals, and a variety of other types
- supports spark-bar and spark-line based on
[Hadley Wickham's pillar package](https://github.com/hadley/pillar).
[the pillar package](https://github.com/hadley/pillar).
- allows users to customize the statistics included by data type and to
implement skimming for additional classes.
- works with many Tidyverse features.

### Separates variables by class:

Expand Down Expand Up @@ -96,7 +107,7 @@ iris %>% dplyr::group_by(Species) %>% skim()

Simply skimming a data frame will produce the horizontal print
layout shown above. When knitting you can also used enhanced rendering
with kable and pander implementations.
with kable and pander implementations (pander support is deprecated for v2).

### Options for kable and pander

Expand All @@ -106,12 +117,14 @@ and the kable function of the [knitr package](https://CRAN.R-project.org/package
These examples show how the enhanced options should appear after
knitting, however your results may differ (see vignettes for details).

Note that pander support within the package is deprecated for version 2.

### Option for kable.
Note that the results='asis' chunk option is used and the
`skimr::` namespace is used to prevent it being
replaced by knitr::kable (which will result in the long skim_df
object being printed.)

```{r results='asis'}
skim(iris) %>% skimr::kable()
```
Expand Down Expand Up @@ -140,6 +153,8 @@ dim(a)
print.data.frame(skim(chickwts))
```

Note that the long skimr object is not supported in version 2.

### Compute on the full `skim_df` object
```{r}
skim(mtcars) %>% dplyr::filter(stat=="hist")
Expand Down
51 changes: 34 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- README.md is generated from README.Rmd. Please edit that file -->
skimr <img src="inst/figures/skimmer_hex.png" align="right" height="139" />
===========================================================================
skimr <img src="man/figures/logo.png" align="right" height="139" />
===================================================================

[![Build
Status](https://travis-ci.org/ropensci/skimr.svg?branch=master)](https://travis-ci.org/ropensci/skimr)
Expand All @@ -18,12 +18,17 @@ human reader.
Installation
------------

Version 2 of skimr is under very active development and near release.
Version 1 is only receiving updates for significant issues. We recommend
that new users interested in the development version consider installing
the v-2 branch.

The current released version of <cite>skimr</cite> can be installed from
CRAN. If you wish to install the current build of the next release you
can do so using the following:

# install.packages("devtools")
devtools::install_github("ropenscilabs/skimr")
devtools::install_github("ropensci/skimr")

The APIs for this branch should be considered reasonably stable but
still subject to change if an issue is discovered.
Expand All @@ -35,17 +40,25 @@ been incorporated in the master branch (and may not be):

Do not rely on APIs from the develop branch.

The v-2 branch is the equivalent to the develop branch for Version 2.
While subject to change, we consider the APIs to be those that will be
part of the version 2 release. Please visit the issue tracker for more
extensive information about version 2.

Skim statistics in the console
------------------------------

<cite>skimr</cite>:

- Provides a larger set of statistics than `summary()`, including
missing, complete, n, and sd.
- reports each data types separately
- reports each data type separately.
- handles dates, logicals, and a variety of other types
- supports spark-bar and spark-line based on [Hadley Wickham's pillar
- supports spark-bar and spark-line based on [the pillar
package](https://github.com/hadley/pillar).
- allows users to customize the statistics included by data type and
to implement skimming for additional classes.
- works with many Tidyverse features.

### Separates variables by class:

Expand All @@ -55,11 +68,11 @@ Skim statistics in the console
## n obs: 71
## n variables: 2
##
## ── Variable type:factor ─────────────────────────────────────────────────────────────
## ── Variable type:factor ──────────────────────────────────────────────────────────────────────
## variable missing complete n n_unique top_counts ordered
## feed 0 71 71 6 soy: 14, cas: 12, lin: 12, sun: 12 FALSE
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## weight 0 71 71 261.31 78.07 108 204.5 258 323.5 423 ▃▅▅▇▃▇▂▂

Expand All @@ -71,11 +84,11 @@ Skim statistics in the console
## n obs: 150
## n variables: 5
##
## ── Variable type:factor ─────────────────────────────────────────────────────────────
## ── Variable type:factor ──────────────────────────────────────────────────────────────────────
## variable missing complete n n_unique top_counts ordered
## Species 0 150 150 3 set: 50, ver: 50, vir: 50, NA: 0 FALSE
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## Petal.Length 0 150 150 3.76 1.77 1 1.6 4.35 5.1 6.9 ▇▁▁▂▅▅▃▁
## Petal.Width 0 150 150 1.2 0.76 0.1 0.3 1.3 1.8 2.5 ▇▁▁▅▃▃▂▂
Expand All @@ -90,7 +103,7 @@ Skim statistics in the console
## n obs: 87
## n variables: 13
##
## ── Variable type:character ──────────────────────────────────────────────────────────
## ── Variable type:character ───────────────────────────────────────────────────────────────────
## variable missing complete n min max empty n_unique
## eye_color 0 87 87 3 13 0 15
## gender 3 84 87 4 13 0 4
Expand All @@ -100,17 +113,17 @@ Skim statistics in the console
## skin_color 0 87 87 3 19 0 31
## species 5 82 87 3 14 0 37
##
## ── Variable type:integer ────────────────────────────────────────────────────────────
## ── Variable type:integer ─────────────────────────────────────────────────────────────────────
## variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## height 6 81 87 174.36 34.77 66 167 180 191 264 ▁▁▁▂▇▃▁▁
##
## ── Variable type:list ───────────────────────────────────────────────────────────────
## ── Variable type:list ────────────────────────────────────────────────────────────────────────
## variable missing complete n n_unique min_length median_length max_length
## films 0 87 87 24 1 1 7
## starships 0 87 87 17 0 0 5
## vehicles 0 87 87 11 0 0 2
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## birth_year 44 43 87 87.57 154.69 8 35 52 72 896 ▇▁▁▁▁▁▁▁
## mass 28 59 87 97.31 169.46 15 55.6 79 84.5 1358 ▇▁▁▁▁▁▁▁
Expand All @@ -137,7 +150,7 @@ Skim statistics in the console
## n obs: 150
## n variables: 5
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## Petal.Length 0 150 150 3.76 1.77 1 1.6 4.35 5.1 6.9 ▇▁▁▂▅▅▃▁
## Sepal.Length 0 150 150 5.84 0.83 4.3 5.1 5.8 6.4 7.9 ▂▇▅▇▆▅▂▂
Expand All @@ -153,7 +166,7 @@ Skim statistics in the console
## n variables: 5
## group variables: Species
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## Species variable missing complete n mean sd p0 p25 p50 p75 p100 hist
## setosa Petal.Length 0 50 50 1.46 0.17 1 1.4 1.5 1.58 1.9 ▁▁▅▇▇▅▂▁
## setosa Petal.Width 0 50 50 0.25 0.11 0.1 0.2 0.2 0.3 0.6 ▂▇▁▂▂▁▁▁
Expand All @@ -173,7 +186,7 @@ Knitted results

Simply skimming a data frame will produce the horizontal print layout
shown above. When knitting you can also used enhanced rendering with
kable and pander implementations.
kable and pander implementations (pander support is deprecated for v2).

### Options for kable and pander

Expand All @@ -185,6 +198,8 @@ package](https://CRAN.R-project.org/package=knitr) These examples show
how the enhanced options should appear after knitting, however your
results may differ (see vignettes for details).

Note that pander support within the package is deprecated for version 2.

### Option for kable.

Note that the results='asis' chunk option is used and the `skimr::`
Expand Down Expand Up @@ -510,6 +525,8 @@ produces a long, tidy-format `skim_df` object that can be computed on.
## 22 feed factor top_counts <NA> 0.0000 NA: 0
## 23 feed factor ordered .all 0.0000 FALSE

Note that the long skimr object is not supported in version 2.

### Compute on the full `skim_df` object

skim(mtcars) %>% dplyr::filter(stat=="hist")
Expand Down Expand Up @@ -555,7 +572,7 @@ data.
## n obs: 150
## n variables: 5
##
## ── Variable type:numeric ────────────────────────────────────────────────────────────
## ── Variable type:numeric ─────────────────────────────────────────────────────────────────────
## variable iqr quantile
## Sepal.Length 1.3 7.7

Expand Down
30 changes: 30 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
template:
package: rotemplate

destination: docs

toc:
depth: 3

navbar:
title: "skimr"
left:
- icon: fa-home
href: index.html
- text: "News"
href: news/index.html
- text: "Articles"
menu:
- text: Using skimr
href: articles/Using_skimr.html
- text: Using fonts
href: articles/Using_fonts.html
- text: skimr defaults
href: articles/Skimr_defaults.html
- text: Supporting additional objects
href: articles/Supporting_additional_objects.html
- text: "Reference"
href: reference/index.html
right:
- icon: fa-github
href: https://github.com/ropensci/skimr
10 changes: 8 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"codeRepository": "https://github.com/ropenscilabs/skimr",
"issueTracker": "https://github.com/ropenscilabs/skimr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "1.0.5",
"version": "1.0.6",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -127,6 +127,12 @@
"givenName": "Patrick",
"familyName": "Kennedy",
"email": "pkqstr@protonmail.com"
},
{
"@type": "Person",
"givenName": "Daniel",
"familyName": "Possenriede",
"email": "possenriede@gmail.com"
}
],
"copyrightHolder": [
Expand Down Expand Up @@ -359,7 +365,7 @@
],
"releaseNotes": "https://github.com/elinw/skimr/blob/master/NEWS.md",
"readme": "https://github.com/elinw/skimr/blob/master/README.md",
"fileSize": "1981.177KB",
"fileSize": "726.653KB",
"contIntegration": [
"https://travis-ci.org/ropenscilabs/skimr",
"https://codecov.io/gh/ropenscilabs/skimr"
Expand Down
File renamed without changes
Binary file added pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon.ico
Binary file not shown.
Loading

0 comments on commit 9bdca0f

Please sign in to comment.