tibble()
call are recycled prior to evaluating subsequent arguments, improving consistency with mutate()
(#213).tibble()
call maintains their class (#284).add_row()
now always preserves the column data types of the input data frame the same way as rbind()
does (#296).lst()
now again handles duplicate names, the value defined last is used in case of a clash.validate
argument is now also supported in as_tibble.tbl_df()
, with default to FALSE
(#278). It must be passed as named argument, as in as_tibble(validate = TRUE)
.format_v()
now always surrounds lists with []
brackets, even if their length is one. This affects glimpse()
output for list columns (#106).glimpse()
(#280).tibble()
gives a consistent error message in the case of duplicate column names (#291).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 (#256, #263).tidy_names(syntactic = TRUE, quiet = FALSE)
if not all names are fixed (#260, @imanuelcostigan).set_tidy_names()
and tidy_names()
, a simpler version of repair_names()
which works unchanged for now (#217).rowid_to_column()
that adds a rowid
column as first column and removes row names (#243, @barnettjacob).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()
(#247).x
again instead of the Unicode multiplication sign, to avoid encoding issues (#216).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()
.print.data.frame()
anymore. Now providing format.tbl_df()
and full support for Unicode characters in names and data, also for glimpse()
(#235).rlang
instead of lazyeval
(#225, @lionel-), and rlang
functions (#244).tribble()
now handles values that have a class (#237, @NikNakk).any(is.na())
with anyNA()
(#229, @csgillespie).microbenchmark
package is now used conditionally (#245).pkgdown
website.mts
and ts
) are now supported in as_tibble()
(#184).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).as.tibble()
as an alias to as_tibble()
(#160, @LaDilettante).frame_matrix()
, similar to frame_data()
but for matrices (#140, #168, @LaDilettante).deframe()
as reverse operation to enframe()
(#146, #214).assertthat
.add_column()
can add columns of length 1 (#162, #164, @LaDilettante).add_row()
for a grouped data frame results in a helpful error message (#179).x
if it cannot be represented in the current locale (#192, @ncarchedi).NA
names in printing (#206, #207, @jennybc).glimpse()
now uses type_sum()
also for S3 objects (#185, #186, @holstius).max.print
option is ignored when printing a tibble (#194, #195, @t-kalinowski).obj_sum
documentation (#193, @etiennebr).tribble()
(#191, @kwstat).tibble.width
option is used for glimpse()
only if it is finite (#153, @kwstat).as_tibble.poly()
to support conversion of a poly
object to a tibble (#110).add_row()
now correctly handles existing columns of type list
that are not updated (#148).all.equal()
doesn’t throw an error anymore if one of the columns is named na.last
, decreasing
or method
(#107, @BillDunlap).add_column()
, analogously to add_row()
(#99).print.tbl_df()
gains n_extra
method and will have the same interface as trunc_mat()
from now on.add_row()
and add_column()
gain .before
and .after
arguments which indicate the row (by number) or column (by number or name) before or after which the new data are inserted. Updated or added columns cannot be named .before
or .after
(#99).frame_data()
to tribble()
, stands for “transposed tibble”. The former is still available as alias (#132, #143).add_row()
now can add multiple rows, with recycling (#142, @jennybc).×
instead of x
when printing dimensions (#126). Output tests had to be disabled for this on Windows.dttm
instead of time
for POSIXt
values (#133), which is now used for columns of the difftime
class.print.tbl_df()
, now using data from nycflights13
instead of Lahman
(#121), with guidance to install nycflights13
package if necessary (#152).Follow-up release.
tibble()
is no longer an alias for frame_data()
(#82).tbl_df()
(#57).$
returns NULL
if column not found, without partial matching. A warning is given (#109).[[
returns NULL
if column not found (#109).#
and contains more text (#95)), removed empty line, showing number of hidden rows and columns (#51). The trailing metadata also begins with hash #
(#101). Presence of row names is indicated by a star in printed output (#72).NA
values in character columns as <NA>
, like print.data.frame()
does (#69).glimpse()
shows nesting structure for lists and uses angle brackets for type (#98).POSIXlt
columns can be printed now, the text <POSIXlt>
is shown as placeholder to encourage usage of POSIXct
(#86).type_sum()
shows only topmost class for S3 objects.ncol
are supported. Passing a matrix or an array now raises an error in any case (#83).NULL
row names (#75).stop()
and warning()
are now always called with call. = FALSE
..Dim
attribute is silently stripped from columns that are 1d matrices (#84).as_tibble.data.frame()
preserves attributes, and uses as_tibble.list()
to calling overriden methods which may lead to endless recursion.has_name()
(#102).tibble()
and as_tibble()
over data_frame()
and as_data_frame()
in code and documentation (#82).is.tibble()
and is_tibble()
(#79).enframe()
that converts vectors to two-column tibbles (#31, #74).obj_sum()
and type_sum()
show "tibble"
instead of "tbl_df"
for tibbles (#82).as_tibble.data.frame()
gains validate
argument (as in as_tibble.list()
), if TRUE
the input is validated.as_tibble.default()
(#71, hadley/dplyr#1752).has_rownames()
supports arguments that are not data frames.[[
works (#58, #63).x[]
) also removes row names.as_tibble.tbl_df()
for subclasses (#60).knitr
internals for testing (#78).knitr
1.13 (#76).knit_print()
tests.tbl_sum.tbl_sql()
and tbl_sum.tbl_grouped_df()
to allow dplyr
release before a tibble
release.format_v()
(#98).NULL
value of tbl_sum()
.expect_output_file()
from testthat
.Initial CRAN release
Extracted from dplyr
0.4.3
tbl_df()
as_data_frame()
data_frame()
, data_frame_()
frame_data()
, tibble()
glimpse()
trunc_mat()
, knit_print.trunc_mat()
type_sum()
lst()
and lst_()
create lists in the same way that data_frame()
and data_frame_()
create data frames (hadley/dplyr#1290). lst(NULL)
doesn’t raise an error (#17, @jennybc), but always uses deparsed expression as name (even for NULL
).add_row()
makes it easy to add a new row to data frame (hadley/dplyr#1021).rownames_to_column()
and column_to_rownames()
(#11, @zhilongjia).has_rownames()
and remove_rownames()
(#44).repair_names()
fixes missing and duplicate names (#10, #15, @r2evans).is_vector_s3()
.as_data_frame.table()
with argument n
to control name of count column (#22, #23).tibble
prefix for options (#13, #36).glimpse()
now (invisibly) returns its argument (hadley/dplyr#1570). It is now a generic, the default method dispatches to str()
(hadley/dplyr#1325). The default width is obtained from the tibble.width
option (#35, #56).as_data_frame()
is now an S3 generic with methods for lists (the old as_data_frame()
), data frames (trivial), matrices (with efficient C++ implementation) (hadley/dplyr#876), and NULL
(returns a 0-row 0-column data frame) (#17, @jennybc).frame_data()
and tibble()
(including lists) creates list-valued columns (#7). These functions return 0-row but n-col data frame if no data.frame_data()
properly constructs rectangular tables (hadley/dplyr#1377, @kevinushey).setOldClass(c("tbl_df", "tbl", "data.frame"))
to help with S4 (hadley/dplyr#969).tbl_df()
automatically generates column names (hadley/dplyr#1606).tbl_df
s gain $
and [[
methods that are ~5x faster than the defaults, never do partial matching (hadley/dplyr#1504), and throw an error if the variable does not exist. [[.tbl_df()
falls back to regular subsetting when used with anything other than a single string (#29). base::getElement()
now works with tibbles (#9).all_equal()
allows to compare data frames ignoring row and column order, and optionally ignoring minor differences in type (e.g. int vs. double) (hadley/dplyr#821). Used by all.equal()
for tibbles. (This package contains a pure R implementation of all_equal()
, the dplyr
code has identical behavior but is written in C++ and thus faster.)data_frame()
and as_data_frame()
have been aligned, so as_data_frame()
will now automatically recycle length-1 vectors. Both functions give more informative error messages if you are attempting to create an invalid data frame. You can no longer create a data frame with duplicated names (hadley/dplyr#820). Both functions now check that you don’t have any POSIXlt
columns, and tell you to use POSIXct
if you do (hadley/dplyr#813). data_frame(NULL)
raises error “must be a 1d atomic vector or list”.trunc_mat()
and print.tbl_df()
are considerably faster if you have very wide data frames. They will now also only list the first 100 additional variables not already on screen - control this with the new n_extra
parameter to print()
(hadley/dplyr#1161). The type of list columns is printed correctly (hadley/dplyr#1379). The width
argument is used also for 0-row or 0-column data frames (#18).[.tbl_df()
does not change class (#41, @jennybc). Improve [.tbl_df()
error message.vignette("tibble")
describes the difference between tbl_dfs and regular data frames (hadley/dplyr#1468).obj_type()
to obj_sum()
, improvements, better integration with type_sum()
.