Skip to content

Commit

Permalink
Merge branch 'r-1.0.0' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 20, 2017
2 parents 3ac58e4 + 3cb3acc commit 536513e
Show file tree
Hide file tree
Showing 257 changed files with 4,455 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
^.*\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^README-.*\.png$
^\.travis\.yml$
^API$
^tic\.R$
^cran-comments\.md$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.Rproj.user
.Rhistory
.RData
inst/doc
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
# Default configuration for use with tic package
# Usually you shouldn't need to change the first part of the file

# DO NOT CHANGE THE CODE BELOW
before_install: R -q -e 'install.packages(c("remotes", "curl")); remotes::install_github("ropenscilabs/tic"); tic::prepare_all_stages(); tic::before_install()'
install: R -q -e 'tic::install()'
after_install: R -q -e 'tic::after_install()'
before_script:
- head -n 100 tests/testthat/out/*
- R -q -e 'tic::before_script()'
script: R -q -e 'tic::script()'
after_success: R -q -e 'tic::after_success()'
after_failure: R -q -e 'tic::after_failure()'
before_deploy: R -q -e 'tic::before_deploy()'
deploy:
provider: script
script: R -q -e 'tic::deploy()'
on:
all_branches: true
after_deploy: R -q -e 'tic::after_deploy()'
after_script: R -q -e 'tic::after_script()'
# DO NOT CHANGE THE CODE ABOVE

# Custom parts:

# Header
language: r
sudo: false
dist: trusty
cache: packages
latex: false
r:
- 3.1
- 3.2
- oldrel
- release
- devel

#env
env:
global:
- _R_CHECK_FORCE_SUGGESTS_=false
- MAKEFLAGS="-j 2"

#services
services:
76 changes: 76 additions & 0 deletions API
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# API for pillar package

## Exported functions

colonnade(x, has_row_id = TRUE, width = NULL, ...)
dim_desc(x)
expect_known_display(object, file, ..., width = 80L, crayon = TRUE)
extra_cols(x, ...)
get_extent(x)
get_max_extent(x)
is_vector_s3(x)
new_ornament(x, width = NULL, align = NULL)
new_pillar_shaft(x, ..., width, min_width = width, subclass)
new_pillar_shaft_simple(formatted, ..., width = NULL, align = "left", min_width = NULL, na_indent = 0L)
obj_sum(x)
pillar(x, title = NULL, width = NULL, ...)
pillar_shaft(x, ...)
squeeze(x, width = NULL, ...)
style_na(x)
style_neg(x)
style_num(x, negative, significant = rep_along(x, TRUE))
style_subtle(x)
type_sum(x)

## Own S3 methods

extra_cols.squeezed_colonnade(x, ...)
is_vector_s3.Date(x)
is_vector_s3.POSIXct(x)
is_vector_s3.data.frame(x)
is_vector_s3.default(x)
is_vector_s3.difftime(x)
is_vector_s3.factor(x)
is_vector_s3.ordered(x)
obj_sum.AsIs(x)
obj_sum.POSIXlt(x)
obj_sum.default(x)
obj_sum.list(x)
pillar_shaft.AsIs(x, ...)
pillar_shaft.Date(x, ...)
pillar_shaft.POSIXt(x, ...)
pillar_shaft.character(x, ...)
pillar_shaft.default(x, ...)
pillar_shaft.list(x, ...)
pillar_shaft.logical(x, ...)
pillar_shaft.numeric(x, ..., sigfig = 3)
type_sum.AsIs(x)
type_sum.Date(x)
type_sum.POSIXct(x)
type_sum.data.frame(x)
type_sum.default(x)
type_sum.difftime(x)
type_sum.factor(x)
type_sum.ordered(x)

## Foreign S3 methods

format.colonnade(x, ...)
format.pillar(x, width = NULL, ...)
format.pillar_shaft(x, width, ...)
format.pillar_shaft_decimal(x, width, ...)
format.pillar_shaft_simple(x, width, ...)
format.pillar_title(x, width, ...)
format.pillar_type(x, width = NULL, ...)
format.rif_data(x, width, ...)
format.rif_title(x, width, ...)
format.rif_type(x, width = NULL, ...)
format.squeezed_colonnade(x, ...)
print.colonnade(x, ...)
print.pillar(x, ...)
print.pillar_ornament(x, ...)
print.pillar_shaft(x, width = NULL, ...)
print.pillar_vertical(x, ...)
print.rif_data(x, ...)
print.spark(x, ...)
print.squeezed_colonnade(x, ...)
48 changes: 44 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,52 @@
Package: colformat
Package: pillar
Title: Coloured Formatting for Columns
Version: 0.0.0.9000
Version: 1.0.0
Authors@R: c(
person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre")),
person("Kirill", "Müller", , "[email protected]", role = c("aut", "cre")),
person("Hadley", "Wickham", role = "aut"),
person("RStudio", role = "cph")
)
Description: Provides a `colformat` generic designed for formatting columns
Description: Provides a 'pillar' generic designed for formatting columns
of data using the full range of colours provided by modern terminals.
License: GPL-3
Encoding: UTF-8
LazyData: true
URL: https://github.com/hadley/pillar
BugReports: https://github.com/hadley/pillar/issues
Imports:
cli,
crayon (>= 1.3.4),
methods,
rlang,
utf8
Suggests:
knitr,
testthat
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "pkgapi::api_roclet"))
RoxygenNote: 6.0.1
Collate:
'compat-purrr.R'
'dim.R'
'extent.R'
'multi.R'
'ornament.R'
'pillar.R'
'rowid-data.R'
'rowid-title.R'
'rowid-type.R'
'scientific.R'
'shaft.R'
'shaft-simple.R'
'sigfig.R'
'spark-bar.R'
'spark-line.R'
'strrep.R'
'styles.R'
'testthat.R'
'tick.R'
'title.R'
'type-sum.R'
'type.R'
'utils.R'
'width.R'
'zzz.R'
71 changes: 69 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,69 @@
# Generated by roxygen2: fake comment so roxygen2 overwrites silently.
exportPattern("^[^\\.]")
# Generated by roxygen2: do not edit by hand

S3method(extra_cols,squeezed_colonnade)
S3method(format,colonnade)
S3method(format,pillar)
S3method(format,pillar_shaft)
S3method(format,pillar_shaft_decimal)
S3method(format,pillar_shaft_simple)
S3method(format,pillar_title)
S3method(format,pillar_type)
S3method(format,rif_data)
S3method(format,rif_title)
S3method(format,rif_type)
S3method(format,squeezed_colonnade)
S3method(is_vector_s3,Date)
S3method(is_vector_s3,POSIXct)
S3method(is_vector_s3,data.frame)
S3method(is_vector_s3,default)
S3method(is_vector_s3,difftime)
S3method(is_vector_s3,factor)
S3method(is_vector_s3,ordered)
S3method(obj_sum,AsIs)
S3method(obj_sum,POSIXlt)
S3method(obj_sum,default)
S3method(obj_sum,list)
S3method(pillar_shaft,AsIs)
S3method(pillar_shaft,Date)
S3method(pillar_shaft,POSIXt)
S3method(pillar_shaft,character)
S3method(pillar_shaft,default)
S3method(pillar_shaft,list)
S3method(pillar_shaft,logical)
S3method(pillar_shaft,numeric)
S3method(print,colonnade)
S3method(print,pillar)
S3method(print,pillar_ornament)
S3method(print,pillar_shaft)
S3method(print,pillar_vertical)
S3method(print,rif_data)
S3method(print,spark)
S3method(print,squeezed_colonnade)
S3method(type_sum,AsIs)
S3method(type_sum,Date)
S3method(type_sum,POSIXct)
S3method(type_sum,data.frame)
S3method(type_sum,default)
S3method(type_sum,difftime)
S3method(type_sum,factor)
S3method(type_sum,ordered)
export(colonnade)
export(dim_desc)
export(expect_known_display)
export(extra_cols)
export(get_extent)
export(get_max_extent)
export(is_vector_s3)
export(new_ornament)
export(new_pillar_shaft)
export(new_pillar_shaft_simple)
export(obj_sum)
export(pillar)
export(pillar_shaft)
export(squeeze)
export(style_na)
export(style_neg)
export(style_num)
export(style_subtle)
export(type_sum)
import(rlang)
37 changes: 37 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## pillar 1.0.0 (2017-11-16)

Initial release.

### User functions

pillar(x, title = NULL, width = NULL, ...)
colonnade(x, has_row_id = TRUE, width = NULL, ...)
squeeze(x, width = NULL, ...)

### Functions for implementers of data types

new_pillar_shaft_simple(formatted, ..., width = NULL, align = "left", min_width = NULL, na_indent = 0L)
new_pillar_shaft(x, ..., width, min_width = width, subclass)
new_ornament(x, width = NULL, align = NULL)
get_extent(x)
get_max_extent(x)

### Utilities

dim_desc(x)
style_na(x)
style_neg(x)
style_num(x, negative, significant = rep_along(x, TRUE))
style_subtle(x)

### Testing helper

expect_known_display(object, file, ..., width = 80L, crayon = TRUE)

### Own S3 methods

pillar_shaft(x, ...) # AsIs, Date, POSIXt, character, default, list, logical, numeric
type_sum(x) # AsIs, Date, POSIXct, data.frame, default, difftime, factor, ordered
is_vector_s3(x) # Date, POSIXct, data.frame, default, difftime, factor, ordered
obj_sum(x) # AsIs, POSIXlt, default, list
extra_cols(x, ...) # squeezed_colonnade
Loading

0 comments on commit 536513e

Please sign in to comment.