Tags: bgreenwell/tibble
Tags
New formatting -------------- The new pillar package is now responsible for formatting tibbles. Pillar will try to display as many columns as possible, if necessary truncating or shortening the output. Colored output highlights important information and guides the eye. The vignette in the tibble package describes how to adapt custom data types for optimal display in a tibble. New features ------------ - Make `add_case()` an alias for `add_row()` (tidyverse#324, @LaDilettante). - `as_tibble()` gains `rownames` argument (tidyverse#288, tidyverse#289). - `as_tibble.matrix()` repairs column names. - Tibbles now support character subsetting (tidyverse#312). - ``` `[.tbl_df`() ``` supports `drop = TRUE` and omits the warning if `j` is passed. The calls `df[i, j, drop = TRUE]` and `df[i, drop = TRUE]` are now compatible with data frames again (tidyverse#307, tidyverse#311). Bug fixes --------- - Improved compatibility with remote data sources for `glimpse()` (tidyverse#328). - Logical indexes are supported, a warning is raised if the length does not match the number of rows or 1 (tidyverse#318). - Fixed width for word wrapping of the extra information (tidyverse#301). - Prevent `add_column()` from dropping classes and attributes by removing the use of `cbind()`. Additionally this ensures that `add_column()` can be used with grouped data frames (tidyverse#303, @DavisVaughan). - `add_column()` to an empty zero-row tibble with a variable of nonzero length now produces a correct error message (tidyverse#319). Internal changes ---------------- - Reexporting `has_name()` from rlang, instead of forwarding, to avoid warning when importing both rlang and tibble. - Compatible with R 3.1 (tidyverse#323). - Remove Rcpp dependency (tidyverse#313, @patperry).
- Cleanly define responsibilities of `new_tibble()` (tidyverse#332). - Reexporting `has_name()` from rlang, instead of forwarding, to avoid warning when importing both rlang and tibble. - Fix copying of attributes in `new_tibble()` (tidyverse#330). - Adapt vignette to new pillar methods.
- In `glimpse()`, compute `type_sum()` from data frame for dbplyr com… …patibility (tidyverse#328). - `as_tibble.matrix()` repairs column names. - Compatible with R 3.1 (tidyverse#323). - Make add_case() and alias for add_row() (tidyverse#324, @LaDilettante). - `add_column()` to an empty zero-row tibble with a variable of nonzero length now produces a correct error message (tidyverse#319). - Logical indexes are supported, a warning is raised if the length does not match the number of rows or 1 (tidyverse#318). - Tibbles now support character subsetting (tidyverse#312). - `as_tibble()` gains `rownames` argument (tidyverse#288, tidyverse#289). - Remove Rcpp dependency (tidyverse#313, @patperry). - ``` `[.tbl_df`() ``` supports `drop = TRUE` and omits the warning if `j` is passed. The calls `df[i, j, drop = TRUE]` and `df[i, drop = TRUE]` are now compatible with data frames again (tidyverse#307, tidyverse#311). - Prevent `add_column()` from dropping classes and attributes by removing the use of `cbind()`. Additionally this ensures that `add_column()` can be used with grouped data frames (tidyverse#303, @DavisVaughan). - Fixed width for word wrapping of the extra information (tidyverse#301).
Bug fixes --------- - Values of length 1 in a `tibble()` call are recycled prior to evaluating subsequent arguments, improving consistency with `mutate()` (tidyverse#213). - Recycling of values of length 1 in a `tibble()` call maintains their class (tidyverse#284). - `add_row()` now always preserves the column data types of the input data frame the same way as `rbind()` does (tidyverse#296). - `lst()` now again handles duplicate names, the value defined last is used in case of a clash. - Adding columns to zero-row data frames now also works when mixing lengths 1 and 0 in the new columns (tidyverse#167). - The `validate` argument is now also supported in `as_tibble.tbl_df()`, with default to `FALSE` (tidyverse#278). It must be passed as named argument, as in `as_tibble(validate = TRUE)`. Formatting ---------- - `format_v()` now always surrounds lists with `[]` brackets, even if their length is one. This affects `glimpse()` output for list columns (tidyverse#106). - Factor levels are escaped when printing (tidyverse#277). - Non-syntactic names are now also escaped in `glimpse()` (tidyverse#280). - `tibble()` gives a consistent error message in the case of duplicate column names (tidyverse#291).
- Escape factor levels when printing (tidyverse#277). - Adding columns to zero-row data frames now also works when mixing lengths 1 and 0 in the new columns (tidyverse#167). - Non-syntactic names are now also escaped in `glimpse()` (tidyverse#280). - The `validate` argument is now also supported in `as_tibble.tbl_df()`, with default to `FALSE` (tidyverse#278).
- Added `format()` and `print()` methods for both `tbl` and `tbl_df` … …classes, to protect against malformed tibbles that inherit from `"tbl_df"` but not `"tbl"`, as created e.g. by `ungroup()` in dplyr 0.5.0 and earlier (tidyverse#256, tidyverse#263). - The column width for non-syntactic columns is computed correctly again (tidyverse#258). - Printing a tibble doesn't apply quote escaping to list columns. - Fix error in `tidy_names(syntactic = TRUE, quiet = FALSE)` if not all names are fixed (tidyverse#260, @imanuelcostigan). - Remove unused import declaration for assertthat.
- Fix error in `tidy_names(syntactic = TRUE, quiet = FALSE)` if not a… …ll names are fixed (tidyverse#260, @imanuelcostigan). - The column width for non-syntactic columns is computed correctly again (tidyverse#258). - The `print.tbl_df()` method is identical to `print.tbl()`, instead of calling `NextMethod()`, to protect against malformed tibbles that inherit from `"tbl_df"` but not `"tbl"`, as created e.g. by `ungroup()` in dplyr 0.5.0 and earlier. - Remove unused import declaration for assertthat.
- Subsetting zero columns no longer returns wrong number of rows (tid… …yverse#241, @echasnovski). - New `set_tidy_names()` and `tidy_names()`, a simpler version of `repair_names()` which works unchanged for now (tidyverse#217). - New `rowid_to_column()` that adds a `rowid` column as first column and removes row names (tidyverse#243, @barnettjacob). - The `all.equal.tbl_df()` method has been removed, calling `all.equal()` now forwards to `base::all.equal.data.frame()`. To compare tibbles ignoring row and column order, please use `dplyr::all_equal()` (tidyverse#247). - Printing now uses `x` again instead of the Unicode multiplication sign, to avoid encoding issues (tidyverse#216). - String values are now quoted when printing if they contain non-printable characters or quotes (tidyverse#253). - The `print()`, `format()`, and `tbl_sum()` methods are now implemented for class `"tbl"` and not for `"tbl_df"`. This allows subclasses to use tibble's formatting facilities. The formatting of the header can be tweaked by implementing `tbl_sum()` for the subclass, which is expected to return a named character vector. The `print.tbl_df()` method is still implemented for compatibility with downstream packages, but only calls `NextMethod()`. - Own printing routine, not relying on `print.data.frame()` anymore. Now providing `format.tbl_df()` and full support for Unicode characters in names and data, also for `glimpse()` (tidyverse#235). - Improve formatting of error messages (tidyverse#223). - Using `rlang` instead of `lazyeval` (tidyverse#225, @lionel-), and `rlang` functions (tidyverse#244). - `tribble()` now handles values that have a class (tidyverse#237, @NikNakk). - Minor efficiency gains by replacing `any(is.na())` with `anyNA()` (tidyverse#229, @csgillespie). - The `microbenchmark` package is now used conditionally (tidyverse#245). - `pkgdown` website.
PreviousNext