Skip to content

Commit

Permalink
Merge tag 'v1.3.0'
Browse files Browse the repository at this point in the history
Bug fixes
=========

- Time series matrices (objects of class `mts` and `ts`) are now supported in `as_tibble()` (#184).
- The `all_equal()` function (called by `all.equal.tbl_df()`) now forwards to `dplyr` and fails with a helpful message if not installed. Data frames with list columns cannot be compared anymore, and differences in the declared class (`data.frame` vs. `tbl_df`) are ignored. The `all.equal.tbl_df()` method gives a warning and forwards to `NextMethod()` if `dplyr` is not installed; call `all.equal(as.data.frame(...), ...)` to avoid the warning. This ensures consistent behavior of this function, regardless if `dplyr` is loaded or not (#198).

Interface changes
=================

- Now requiring R 3.1.0 instead of R 3.1.3 (#189).
- Add `as.tibble()` as an alias to `as_tibble()` (#160, @LaDilettante).
- New `frame_matrix()`, similar to `frame_data()` but for matrices (#140, #168, @LaDilettante).
- New `deframe()` as reverse operation to `enframe()` (#146, #214).
- Removed unused dependency on `assertthat`.

Features
========

General
-------

- Keep column classes when adding row to empty tibble (#171, #177, @LaDilettante).
- Singular and plural variants for error messages that mention a list of objects (#116, #138, @LaDilettante).
- `add_column()` can add columns of length 1 (#162, #164, @LaDilettante).

Input validation
----------------

- An attempt to read or update a missing column now throws a clearer warning (#199).
- An attempt to call `add_row()` for a grouped data frame results in a helpful error message (#179).

Printing
--------

- Render Unicode multiplication sign as `x` if it cannot be represented in the current locale (#192, @ncarchedi).
- Backtick `NA` names in printing (#206, #207, @jennybc).
- `glimpse()` now uses `type_sum()` also for S3 objects (#185, #186, @holstius).
- The `max.print` option is ignored when printing a tibble (#194, #195, @t-kalinowski).

Documentation
=============

- Fix typo in `obj_sum` documentation (#193, @etiennebr).
- Reword documentation for `tribble()` (#191, @kwstat).
- Now explicitly stating minimum Rcpp version 0.12.3.

Internal
========

- Using registration of native routines.
  • Loading branch information
krlmlr committed Apr 1, 2017
2 parents 4c32758 + 4cd06b9 commit 797d711
Show file tree
Hide file tree
Showing 26 changed files with 3,754 additions and 789 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -10,3 +10,4 @@
^appveyor\.yml$
^\.deploy_key\.pub$
^\.deploy_key\.enc$
^API$
90 changes: 90 additions & 0 deletions API
@@ -0,0 +1,90 @@
# API for tibble package

## Exported functions

add_column(.data, ..., .before = NULL, .after = NULL)
add_row(.data, ..., .before = NULL, .after = NULL)
as.tibble(x, ...)
as_data_frame(x, ...)
as_tibble(x, ...)
column_to_rownames(df, var = "rowname")
data_frame(...)
data_frame_(xs)
deframe(x)
enframe(x, name = "name", value = "value")
frame_data(...)
frame_matrix(...)
glimpse(x, width = NULL, ...)
has_name(x, name)
has_rownames(df)
is.tibble(x)
is_tibble(x)
is_vector_s3(x)
knit_print.trunc_mat(x, options)
lst(...)
lst_(xs)
obj_sum(x)
remove_rownames(df)
repair_names(x, prefix = "V", sep)
rownames_to_column(df, var = "rowname")
tbl_sum(x)
tibble(...)
tibble_(xs)
tribble(...)
trunc_mat(x, n = NULL, width = NULL, n_extra = NULL)
type_sum(x)

## S3 methods

as_data_frame.NULL(x, ...)
as_data_frame.data.frame(x, validate = TRUE, ...)
as_data_frame.default(x, ...)
as_data_frame.list(x, validate = TRUE, ...)
as_data_frame.matrix(x, ...)
as_data_frame.table(x, n = "n", ...)
as_data_frame.tbl_df(x, ...)
as_tibble.NULL(x, ...)
as_tibble.data.frame(x, validate = TRUE, ...)
as_tibble.default(x, ...)
as_tibble.list(x, validate = TRUE, ...)
as_tibble.matrix(x, ...)
as_tibble.poly(x, ...)
as_tibble.table(x, n = "n", ...)
as_tibble.tbl_df(x, ...)
as_tibble.ts(x, ...)
check_names_before_after.character(j, names)
check_names_before_after.default(j, ...)
check_names_df.character(j, x)
check_names_df.default(j, ...)
check_names_df.logical(j, x)
check_names_df.numeric(j, x)
format_v.character(x)
format_v.default(x)
format_v.list(x)
glimpse.data.frame(x, width = NULL, ...)
glimpse.default(x, width = NULL, max.level = 3, ...)
glimpse.tbl(x, width = NULL, ...)
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.POSIXlt(x)
obj_sum.default(x)
obj_sum.list(x)
quote_n.character(x)
quote_n.default(x)
tbl_sum.default(x)
tbl_sum.grouped_df(x)
tbl_sum.tbl_df(x)
tbl_sum.tbl_sql(x)
type_sum.Date(x)
type_sum.POSIXt(x)
type_sum.data.frame(x)
type_sum.default(x)
type_sum.difftime(x)
type_sum.factor(x)
type_sum.ordered(x)
type_sum.tbl_df(x)
5 changes: 2 additions & 3 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: tibble
Encoding: UTF-8
Version: 1.2-15
Version: 1.3.0
Title: Simple Data Frames
Description: Provides a 'tbl_df' class that offers better checking and
printing capabilities than traditional data frames.
Expand All @@ -16,7 +16,6 @@ Depends:
R (>= 3.1.0)
Imports:
methods,
assertthat,
utils,
lazyeval (>= 0.1.10),
Rcpp (>= 0.12.3)
Expand All @@ -31,6 +30,6 @@ Suggests:
LinkingTo: Rcpp
LazyData: yes
License: MIT + file LICENSE
Roxygen: list(markdown = TRUE)
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "pkgapi::api_roclet"))
RoxygenNote: 6.0.1
VignetteBuilder: knitr
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,2 +1,2 @@
YEAR: 2013-2016
YEAR: 2013-2017
COPYRIGHT HOLDER: RStudio
3 changes: 1 addition & 2 deletions NAMESPACE
Expand Up @@ -91,10 +91,9 @@ export(tibble_)
export(tribble)
export(trunc_mat)
export(type_sum)
import(assertthat)
importFrom(Rcpp,sourceCpp)
importFrom(stats,setNames)
importFrom(utils,head)
importFrom(utils,str)
importFrom(utils,tail)
useDynLib(tibble)
useDynLib(tibble, .registration = TRUE)
54 changes: 28 additions & 26 deletions NEWS.md
@@ -1,45 +1,47 @@
## tibble 1.2-15 (2017-01-10)
# tibble 1.3.0 (2017-01-10)

- Test R 3.1.3 and later in AppVeyor, using `Depends: R (>= 3.1.0)` in `DESCRIPTION`. Support for R 3.0.0 requires a `lazyeval` update (#189).
- An attempt to partially update a missing column now throws a clearer warning (#199).
- Time series matrices (objects of class `mts` and `ts`) are now supported in `as_tibble()` (#184).
- An attempt to call `add_row()` for a grouped data frame results in a helpful error message (#179).
- The `all_equal()` function (called by `all.equal.tbl_df()`) now forwards to `dplyr` and fails with a helpful message if not installed. Data frames with list columns cannot be compared anymore, and differences in the declard class (`data.frame` vs. `tbl_df`) are ignored. This ensures consistent behavior of this function, regardless if `dplyr` is loaded or not (#198).
- Backtick `NA` names in printing (#206, #207, @jennybc).
## Bug fixes

- Time series matrices (objects of class `mts` and `ts`) are now supported in `as_tibble()` (#184).
- The `all_equal()` function (called by `all.equal.tbl_df()`) now forwards to `dplyr` and fails with a helpful message if not installed. Data frames with list columns cannot be compared anymore, and differences in the declared class (`data.frame` vs. `tbl_df`) are ignored. The `all.equal.tbl_df()` method gives a warning and forwards to `NextMethod()` if `dplyr` is not installed; call `all.equal(as.data.frame(...), ...)` to avoid the warning. This ensures consistent behavior of this function, regardless if `dplyr` is loaded or not (#198).

## tibble 1.2-14 (2017-01-04)
## Interface changes

- `glimpse()` now uses `type_sum()` also for S3 objects (#185, #186, @holstius).
- Reword documentation for `tribble()` (#191, @kwstat).
- Unicode multiplication sign is rendered as `x` if it cannot be represented in the current locale (#192, @ncarchedi).
- Now requiring R 3.1.0 instead of R 3.1.3 (#189).
- Add `as.tibble()` as an alias to `as_tibble()` (#160, @LaDilettante).
- New `frame_matrix()`, similar to `frame_data()` but for matrices (#140, #168, @LaDilettante).
- New `deframe()` as reverse operation to `enframe()` (#146, #214).
- Removed unused dependency on `assertthat`.

## Features

## tibble 1.2-13 (2016-11-30)
### General

- New `frame_matrix()` (#140, #168, @LaDilettante).
- The `max.print` option is ignored when printing a tibble (#194, #195, @t-kalinowski).
- Fix typo in `obj_sum` documentation (#193, @etiennebr).
- Keep column classes when adding row to empty tibble (#171, #177, @LaDilettante).
- Now explicitly stating minimum Rcpp version 0.12.3.

- Singular and plural variants for error messages that mention a list of objects (#116, #138, @LaDilettante).
- `add_column()` can add columns of length 1 (#162, #164, @LaDilettante).

## tibble 1.2-12 (2016-08-30)
### Input validation

- Simplify tests for `add_row()` and `add_column()` (#165, #166, @LaDilettante).
- `add_column()` can add columns of length 1 (#162, #164, @LaDilettante).
- Singular and plural variants for error messages that mention a list of objects (#116, #138, @LaDilettante).
- An attempt to read or update a missing column now throws a clearer warning (#199).
- An attempt to call `add_row()` for a grouped data frame results in a helpful error message (#179).

### Printing

## tibble 1.2-11 (2016-08-29)
- Render Unicode multiplication sign as `x` if it cannot be represented in the current locale (#192, @ncarchedi).
- Backtick `NA` names in printing (#206, #207, @jennybc).
- `glimpse()` now uses `type_sum()` also for S3 objects (#185, #186, @holstius).
- The `max.print` option is ignored when printing a tibble (#194, #195, @t-kalinowski).

- Add `as.tibble()` as an alias to `as_tibble()` (#160, @LaDilettante).
- Added tests for `tibble_width()` and `tibble_glimpse_width()` (#163, @LaDilettante).
## Documentation

- Fix typo in `obj_sum` documentation (#193, @etiennebr).
- Reword documentation for `tribble()` (#191, @kwstat).
- Now explicitly stating minimum Rcpp version 0.12.3.

## tibble 1.2-10 (2016-08-29)
## Internal

- Same as 1.2.
- Using registration of native routines.


# tibble 1.2 (2016-08-26)
Expand Down
11 changes: 9 additions & 2 deletions R/all-equal.r
Expand Up @@ -33,7 +33,7 @@
all_equal <- function(target, current, ignore_col_order = TRUE,
ignore_row_order = TRUE, convert = FALSE, ...) {
if (!requireNamespace("dplyr", quietly = TRUE)) {
stop("Please install dplyr to use all.equal() on tibbles", call. = FALSE)
stop("Please install dplyr to use all_equal()", call. = FALSE)
}

dplyr_all_equal <- get(
Expand All @@ -49,4 +49,11 @@ all_equal <- function(target, current, ignore_col_order = TRUE,
#' @export
#' @rdname all_equal
#' @method all.equal tbl_df
all.equal.tbl_df <- all_equal
all.equal.tbl_df <- function(target, current, ...) {
if (!requireNamespace("dplyr", quietly = TRUE)) {
warning("Please install dplyr to use all.equal() on tibbles", call. = FALSE)
return(NextMethod())
}

all_equal(target, current, ...)
}
3 changes: 1 addition & 2 deletions R/tibble.R
@@ -1,6 +1,5 @@
#' @useDynLib tibble
#' @useDynLib tibble, .registration = TRUE
#' @importFrom Rcpp sourceCpp
#' @import assertthat
#' @importFrom utils head tail
#' @aliases NULL
#' @details The S3 class `tbl_df` wraps a local data frame. The main
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Expand Up @@ -45,6 +45,9 @@ environment:
RTOOLS_VERSION: 32
CRAN: http://cran.rstudio.com

matrix:
fast_finish: true

build_script:
- travis-tool.sh install_deps

Expand Down
9 changes: 7 additions & 2 deletions cran-comments.md
Expand Up @@ -8,5 +8,10 @@

## Reverse dependencies

I checked all 88 reverse dependencies for version 1.2 and for the current release,
and compared the outputs of R CMD check. They were identical for all packages; tidyr requires version 0.6.1 which contains a compatibility fix.
I checked all 118 reverse dependencies on CRAN and Bioconductor for version 1.2
and for the current release, and compared the outputs of R CMD check. They were
identical for all packages.

The compatibility error in the `readr` package is now finally resolved.
The test error for the `refimpact` package seems to occur only sporadically,
this looks like an unstable test to me, and not like a regression caused by `tibble`.
3 changes: 1 addition & 2 deletions man/all_equal.Rd

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

0 comments on commit 797d711

Please sign in to comment.