diff --git a/.Rbuildignore b/.Rbuildignore index b0a5c3d3c..308cab0ce 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -20,3 +20,4 @@ ^pkgdown$ ^\.github/workflows/R\.yaml$ ^\.github/workflows/pr-commands\.yaml$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index f6a3aef1f..94b4d9f94 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tidyr Title: Tidy Messy Data -Version: 1.2.0 +Version: 1.2.1 Authors@R: c( person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre")), person("Maximilian", "Girlich", role = "aut"), @@ -48,5 +48,5 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.1 SystemRequirements: C++11 diff --git a/NEWS.md b/NEWS.md index 1922fce40..a6955aafc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# tidyr 1.2.1 + +* Hot patch release to resolve R CMD check failures. + # tidyr 1.2.0 ## Pivoting @@ -423,7 +427,7 @@ See `vignette("in-packages")` for a detailed transition guide. warnings. I think one clean break should be less work for everyone. All other lazyeval functions have been formally deprecated, and will be - made defunct in the next major release. (See [lifecycle vignette](https://lifecycle.r-lib.org/articles/lifecycle.html) for + made defunct in the next major release. (See [lifecycle vignette](https://lifecycle.r-lib.org/) for details on deprecation stages). * `crossing()` and `nesting()` now return 0-row outputs if any input is a diff --git a/R/data.R b/R/data.R index 0eb020348..a4360bdc1 100644 --- a/R/data.R +++ b/R/data.R @@ -141,7 +141,7 @@ #' income range in column name} #' } #' @source -#' Downloaded from +#' Downloaded from #' (downloaded November 2009) "relig_income" diff --git a/cran-comments.md b/cran-comments.md index bdd567bf7..2c50ef40c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,40 +1,3 @@ ## revdepcheck results -We checked 1451 reverse dependencies (1441 from CRAN + 10 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. - - * We saw 7 new problems - * We failed to check 3 packages - -Issues with CRAN packages are summarised below. - -### New problems -(This reports the first line of each new failure) - -* covidregionaldata - checking tests ... ERROR - checking re-building of vignette outputs ... WARNING - -* emayili - checking examples ... ERROR - checking tests ... ERROR - -* simpr - checking S3 generic/method consistency ... WARNING - -* skater - checking re-building of vignette outputs ... WARNING - -* sparklyr - checking S3 generic/method consistency ... WARNING - -* SWMPrExtension - checking examples ... ERROR - -* xml2relational - checking examples ... ERROR - -### Failed to check - -* loon.ggplot (NA) -* PLNmodels (NA) -* vivid (NA) +This is a patch release that fixes HTML issues in .Rd files. I did not check revdeps. diff --git a/man/deprecated-se.Rd b/man/deprecated-se.Rd index 61000e076..213dded49 100644 --- a/man/deprecated-se.Rd +++ b/man/deprecated-se.Rd @@ -156,10 +156,8 @@ happens when there are too many pieces. There are three valid options: \item "merge": only splits at most \code{length(into)} times }} -\item{drop}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}: -all list-columns are now preserved; If there are any that you -don't want in the output use \code{select()} to remove them prior to -unnesting.} +\item{drop}{If \code{FALSE}, will keep factor levels that don't appear in the +data, filling in missing combinations with \code{fill}.} \item{from}{Names of existing columns as character vector} diff --git a/man/extract.Rd b/man/extract.Rd index 4357d85bf..ef76bf5af 100644 --- a/man/extract.Rd +++ b/man/extract.Rd @@ -22,7 +22,7 @@ extract( \code{\link[tidyselect:vars_pull]{tidyselect::vars_pull()}}. This argument is passed by expression and supports -\link[rlang:nse-force]{quasiquotation} (you can unquote column +\link[rlang:topic-inject]{quasiquotation} (you can unquote column names or column positions).} \item{into}{Names of new variables to create as character vector. diff --git a/man/gather.Rd b/man/gather.Rd index 7c24a4771..db42a5459 100644 --- a/man/gather.Rd +++ b/man/gather.Rd @@ -21,9 +21,9 @@ gather( symbols. This argument is passed by expression and supports -\link[rlang:nse-force]{quasiquotation} (you can unquote strings +\link[rlang:topic-inject]{quasiquotation} (you can unquote strings and symbols). The name is captured from the expression with -\code{\link[rlang:nse-defuse]{rlang::ensym()}} (note that this kind of interface where +\code{\link[rlang:defusing-advanced]{rlang::ensym()}} (note that this kind of interface where symbols do not represent actual objects is now discouraged in the tidyverse; we support it here for backward compatibility).} diff --git a/man/nest.Rd b/man/nest.Rd index 7202d11fd..a791ba35b 100644 --- a/man/nest.Rd +++ b/man/nest.Rd @@ -111,10 +111,12 @@ tidyr 1.0.0 introduced a new syntax for \code{nest()} and \code{unnest()} that's designed to be more similar to other functions. Converting to the new syntax should be straightforward (guided by the message you'll recieve) but if you just need to run an old analysis, you can easily revert to the previous -behaviour using \code{\link[=nest_legacy]{nest_legacy()}} and \code{\link[=unnest_legacy]{unnest_legacy()}} as follows:\preformatted{library(tidyr) +behaviour using \code{\link[=nest_legacy]{nest_legacy()}} and \code{\link[=unnest_legacy]{unnest_legacy()}} as follows: + +\if{html}{\out{
}}\preformatted{library(tidyr) nest <- nest_legacy unnest <- unnest_legacy -} +}\if{html}{\out{
}} } \section{Grouped data frames}{ diff --git a/man/nest_legacy.Rd b/man/nest_legacy.Rd index b31e4ca79..7b8bb95bf 100644 --- a/man/nest_legacy.Rd +++ b/man/nest_legacy.Rd @@ -17,8 +17,8 @@ functions of variables. If omitted, defaults to all list-cols.} \item{.key}{The name of the new column, as a string or symbol. This argument is passed by expression and supports -\link[rlang:nse-force]{quasiquotation} (you can unquote strings and -symbols). The name is captured from the expression with \code{\link[rlang:nse-defuse]{rlang::ensym()}} +\link[rlang:topic-inject]{quasiquotation} (you can unquote strings and +symbols). The name is captured from the expression with \code{\link[rlang:defusing-advanced]{rlang::ensym()}} (note that this kind of interface where symbols do not represent actual objects is now discouraged in the tidyverse; we support it here for backward compatibility).} @@ -47,10 +47,12 @@ tidyr 1.0.0 introduced a new syntax for \code{\link[=nest]{nest()}} and \code{\l of existing usage should be automatically translated to the new syntax with a warning. However, if you need to quickly roll back to the previous behaviour, these functions provide the previous interface. To make old code work as is, -add the following code to the top of your script:\preformatted{library(tidyr) +add the following code to the top of your script: + +\if{html}{\out{
}}\preformatted{library(tidyr) nest <- nest_legacy unnest <- unnest_legacy -} +}\if{html}{\out{
}} } \examples{ # Nest and unnest are inverses diff --git a/man/pivot_longer_spec.Rd b/man/pivot_longer_spec.Rd index 2e7f83661..f94dba9c0 100644 --- a/man/pivot_longer_spec.Rd +++ b/man/pivot_longer_spec.Rd @@ -51,29 +51,6 @@ in the \code{value_to} column. This effectively converts explicit missing values to implicit missing values, and should generally be used only when missing values in \code{data} were created by its structure.} -\item{values_ptypes}{Optionally, a list of column name-prototype -pairs. Alternatively, a single empty prototype can be supplied, which will -be applied to all columns. A prototype (or ptype for short) is a -zero-length vector (like \code{integer()} or \code{numeric()}) that defines the type, -class, and attributes of a vector. Use these arguments if you want to -confirm that the created columns are the types that you expect. Note that -if you want to change (instead of confirm) the types of specific columns, -you should use \code{names_transform} or \code{values_transform} instead. - -For backwards compatibility reasons, supplying \code{list()} is interpreted as -being identical to \code{NULL} rather than as using a list prototype on all -columns. Expect this to change in the future.} - -\item{values_transform}{Optionally, a list of column -name-function pairs. Alternatively, a single function can be supplied, -which will be applied to all columns. Use these arguments if you need to -change the types of specific columns. For example, \code{names_transform = list(week = as.integer)} would convert a character variable called \code{week} -to an integer. - -If not specified, the type of the columns generated from \code{names_to} will -be character, and the type of the variables generated from \code{values_to} -will be the common type of the input columns used to generate them.} - \item{cols}{<\code{\link[=tidyr_tidy_select]{tidy-select}}> Columns to pivot into longer format.} @@ -105,21 +82,7 @@ existing column names.} \item{names_prefix}{A regular expression used to remove matching text from the start of each variable name.} -\item{names_sep}{If \code{names_to} contains multiple values, -these arguments control how the column name is broken up. - -\code{names_sep} takes the same specification as \code{\link[=separate]{separate()}}, and can either -be a numeric vector (specifying positions to break on), or a single string -(specifying a regular expression to split on). - -\code{names_pattern} takes the same specification as \code{\link[=extract]{extract()}}, a regular -expression containing matching groups (\verb{()}). - -If these arguments do not give you enough control, use -\code{pivot_longer_spec()} to create a spec object and process manually as -needed.} - -\item{names_pattern}{If \code{names_to} contains multiple values, +\item{names_sep, names_pattern}{If \code{names_to} contains multiple values, these arguments control how the column name is broken up. \code{names_sep} takes the same specification as \code{\link[=separate]{separate()}}, and can either @@ -133,7 +96,7 @@ If these arguments do not give you enough control, use \code{pivot_longer_spec()} to create a spec object and process manually as needed.} -\item{names_ptypes}{Optionally, a list of column name-prototype +\item{names_ptypes, values_ptypes}{Optionally, a list of column name-prototype pairs. Alternatively, a single empty prototype can be supplied, which will be applied to all columns. A prototype (or ptype for short) is a zero-length vector (like \code{integer()} or \code{numeric()}) that defines the type, @@ -146,7 +109,7 @@ For backwards compatibility reasons, supplying \code{list()} is interpreted as being identical to \code{NULL} rather than as using a list prototype on all columns. Expect this to change in the future.} -\item{names_transform}{Optionally, a list of column +\item{names_transform, values_transform}{Optionally, a list of column name-function pairs. Alternatively, a single function can be supplied, which will be applied to all columns. Use these arguments if you need to change the types of specific columns. For example, \code{names_transform = list(week = as.integer)} would convert a character variable called \code{week} diff --git a/man/pivot_wider_spec.Rd b/man/pivot_wider_spec.Rd index a0f7ee4fb..575266778 100644 --- a/man/pivot_wider_spec.Rd +++ b/man/pivot_wider_spec.Rd @@ -91,15 +91,7 @@ all unspecified columns will be considered \code{id_cols}. This is similar to grouping by the \code{id_cols} then summarizing the unused columns using \code{unused_fn}.} -\item{names_from}{<\code{\link[=tidyr_tidy_select]{tidy-select}}> A pair of -arguments describing which column (or columns) to get the name of the -output column (\code{names_from}), and which column (or columns) to get the -cell values from (\code{values_from}). - -If \code{values_from} contains multiple values, the value will be added to the -front of the output column.} - -\item{values_from}{<\code{\link[=tidyr_tidy_select]{tidy-select}}> A pair of +\item{names_from, values_from}{<\code{\link[=tidyr_tidy_select]{tidy-select}}> A pair of arguments describing which column (or columns) to get the name of the output column (\code{names_from}), and which column (or columns) to get the cell values from (\code{values_from}). diff --git a/man/relig_income.Rd b/man/relig_income.Rd index 61c97105d..9a780f33f 100644 --- a/man/relig_income.Rd +++ b/man/relig_income.Rd @@ -13,7 +13,7 @@ income range in column name} } } \source{ -Downloaded from \url{https://www.pewforum.org/religious-landscape-study/} +Downloaded from \url{https://www.pewresearch.org/religion/religious-landscape-study/} (downloaded November 2009) } \usage{ diff --git a/man/separate.Rd b/man/separate.Rd index 9f3c33e5c..f42ff4bdd 100644 --- a/man/separate.Rd +++ b/man/separate.Rd @@ -24,7 +24,7 @@ separate( \code{\link[tidyselect:vars_pull]{tidyselect::vars_pull()}}. This argument is passed by expression and supports -\link[rlang:nse-force]{quasiquotation} (you can unquote column +\link[rlang:topic-inject]{quasiquotation} (you can unquote column names or column positions).} \item{into}{Names of new variables to create as character vector. diff --git a/man/spread.Rd b/man/spread.Rd index e061396e3..303fd4dd5 100644 --- a/man/spread.Rd +++ b/man/spread.Rd @@ -13,7 +13,7 @@ spread(data, key, value, fill = NA, convert = FALSE, drop = TRUE, sep = NULL) \code{\link[tidyselect:vars_pull]{tidyselect::vars_pull()}}. These arguments are passed by expression and support -\link[rlang:nse-force]{quasiquotation} (you can unquote column +\link[rlang:topic-inject]{quasiquotation} (you can unquote column names or column positions).} \item{fill}{If set, missing values will be replaced with this value. Note diff --git a/man/tidyr-package.Rd b/man/tidyr-package.Rd index bbf21e736..550138763 100644 --- a/man/tidyr-package.Rd +++ b/man/tidyr-package.Rd @@ -6,7 +6,7 @@ \alias{tidyr-package} \title{tidyr: Tidy Messy Data} \description{ -\if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} Tools to help to create tidy data, where each column is a variable, each row is an observation, and each cell contains a single value. 'tidyr' contains tools for changing the shape (pivoting) and hierarchy (nesting and 'unnesting') of a dataset, turning deeply nested lists into rectangular data frames ('rectangling'), and extracting values out of string columns. It also includes tools for working with missing values (both implicit and explicit). } diff --git a/man/unite.Rd b/man/unite.Rd index bd8872c9c..514bfafcb 100644 --- a/man/unite.Rd +++ b/man/unite.Rd @@ -12,9 +12,9 @@ unite(data, col, ..., sep = "_", remove = TRUE, na.rm = FALSE) \item{col}{The name of the new column, as a string or symbol. This argument is passed by expression and supports -\link[rlang:nse-force]{quasiquotation} (you can unquote strings +\link[rlang:topic-inject]{quasiquotation} (you can unquote strings and symbols). The name is captured from the expression with -\code{\link[rlang:nse-defuse]{rlang::ensym()}} (note that this kind of interface where +\code{\link[rlang:defusing-advanced]{rlang::ensym()}} (note that this kind of interface where symbols do not represent actual objects is now discouraged in the tidyverse; we support it here for backward compatibility).} diff --git a/tests/testthat/_snaps/chop.md b/tests/testthat/_snaps/chop.md index 1119888d5..99aaabe3a 100644 --- a/tests/testthat/_snaps/chop.md +++ b/tests/testthat/_snaps/chop.md @@ -4,7 +4,8 @@ (expect_error(chop(df))) Output - Argument `cols` is missing with no default + Error in `check_present()`: + ! Argument `cols` is missing with no default # incompatible sizes are caught @@ -12,7 +13,8 @@ (expect_error(unchop(df, c(x, y)))) Output - In row 1, can't recycle input of size 2 to size 3. + Error in `fn()`: + ! In row 1, can't recycle input of size 2 to size 3. # empty typed inputs are considered in common size, but NULLs aren't @@ -20,5 +22,6 @@ (expect_error(unchop(df, c(x, y)))) Output - In row 1, can't recycle input of size 0 to size 2. + Error in `fn()`: + ! In row 1, can't recycle input of size 0 to size 2. diff --git a/tests/testthat/_snaps/drop-na.md b/tests/testthat/_snaps/drop-na.md index abadd1824..07e520ee5 100644 --- a/tests/testthat/_snaps/drop-na.md +++ b/tests/testthat/_snaps/drop-na.md @@ -4,7 +4,8 @@ (expect_error(drop_na(df, list()))) Output - Must subset columns with a valid subscript vector. + Error in `drop_na()`: + ! Must select columns with a valid subscript vector. x Subscript has the wrong type `list`. i It must be numeric or character. @@ -14,6 +15,7 @@ (expect_error(drop_na(df, "z"))) Output - Can't subset columns that don't exist. + Error in `drop_na()`: + ! Can't select columns that don't exist. x Column `z` doesn't exist. diff --git a/tests/testthat/_snaps/expand.md b/tests/testthat/_snaps/expand.md index 52ec0a265..273afce1a 100644 --- a/tests/testthat/_snaps/expand.md +++ b/tests/testthat/_snaps/expand.md @@ -4,34 +4,35 @@ (expect_error(crossing(x = 1:10, y = quote(a)))) Output - `..2` must be a vector, not a symbol. + Error in `grid_dots()`: + ! `..2` must be a vector, not a symbol. # expand() respects `.name_repair` Code out <- df %>% expand(x = x, x = x, .name_repair = "unique") - Message + Message New names: - * x -> x...1 - * x -> x...2 + * `x` -> `x...1` + * `x` -> `x...2` # crossing() / nesting() respect `.name_repair` Code out <- crossing(x = x, x = x, .name_repair = "unique") - Message + Message New names: - * x -> x...1 - * x -> x...2 + * `x` -> `x...1` + * `x` -> `x...2` --- Code out <- nesting(x = x, x = x, .name_repair = "unique") - Message + Message New names: - * x -> x...1 - * x -> x...2 + * `x` -> `x...1` + * `x` -> `x...2` # expand_grid() can control name_repair @@ -39,18 +40,20 @@ (expect_error(expand_grid(x = x, x = x))) Output - Names must be unique. + Error in `df_list()`: + ! Names must be unique. x These names are duplicated: * "x" at locations 1 and 2. + i Use argument `.name_repair` to specify repair strategy. --- Code out <- expand_grid(x = x, x = x, .name_repair = "unique") - Message + Message New names: - * x -> x...1 - * x -> x...2 + * `x` -> `x...1` + * `x` -> `x...2` # grid_dots() reject non-vector input @@ -58,5 +61,6 @@ (expect_error(grid_dots(lm(1 ~ 1)))) Output - `..1` must be a vector, not a object. + Error in `grid_dots()`: + ! `..1` must be a vector, not a object. diff --git a/tests/testthat/_snaps/extract.md b/tests/testthat/_snaps/extract.md index 0dd82f15e..c75f2a59e 100644 --- a/tests/testthat/_snaps/extract.md +++ b/tests/testthat/_snaps/extract.md @@ -15,5 +15,6 @@ (expect_error(extract(df, x, "x", regex = regex))) Output - `regex` can't use modifiers from stringr. + Error in `check_not_stringr_pattern()`: + ! `regex` can't use modifiers from stringr. diff --git a/tests/testthat/_snaps/gather.md b/tests/testthat/_snaps/gather.md index cd0a303d0..d93b114b9 100644 --- a/tests/testthat/_snaps/gather.md +++ b/tests/testthat/_snaps/gather.md @@ -35,7 +35,7 @@ Code out <- gather(df, k, v) - Warning + Warning attributes are not identical across measure variables; they will be dropped @@ -43,7 +43,7 @@ Code gather(df, k, v) - Warning + Warning attributes are not identical across measure variables; they will be dropped Output diff --git a/tests/testthat/_snaps/nest-legacy.md b/tests/testthat/_snaps/nest-legacy.md index 8ca81eb6b..da12a349d 100644 --- a/tests/testthat/_snaps/nest-legacy.md +++ b/tests/testthat/_snaps/nest-legacy.md @@ -4,7 +4,8 @@ (expect_error(unnest_legacy(df))) Output - Each column must either be a list of vectors or a list of data frames [x] + Error in `unnest_legacy()`: + ! Each column must either be a list of vectors or a list of data frames [x] # multiple columns must be same length @@ -12,7 +13,8 @@ (expect_error(unnest_legacy(df))) Output - All nested columns must have the same number of elements. + Error in `unnest_legacy()`: + ! All nested columns must have the same number of elements. --- @@ -20,5 +22,6 @@ (expect_error(unnest_legacy(df))) Output - All nested columns must have the same number of elements. + Error in `unnest_legacy()`: + ! All nested columns must have the same number of elements. diff --git a/tests/testthat/_snaps/nest.md b/tests/testthat/_snaps/nest.md index 8248e4f9d..80cb923cb 100644 --- a/tests/testthat/_snaps/nest.md +++ b/tests/testthat/_snaps/nest.md @@ -2,7 +2,7 @@ Code out <- nest(df) - Warning + Warning `...` must not be empty for ungrouped data frames. Did you want `data = everything()`? @@ -12,7 +12,8 @@ (expect_error(unnest(df, y))) Output - Input must be a vector, not a function. + Error in `list_sizes()`: + ! `x[[1]]` must be a vector, not a function. # multiple columns must be same length @@ -20,7 +21,8 @@ (expect_error(unnest(df, c(x, y)))) Output - In row 1, can't recycle input of size 2 to size 3. + Error in `fn()`: + ! In row 1, can't recycle input of size 2 to size 3. --- @@ -28,7 +30,8 @@ (expect_error(unnest(df, c(x, y)))) Output - In row 1, can't recycle input of size 2 to size 3. + Error in `fn()`: + ! In row 1, can't recycle input of size 2 to size 3. # unnesting column of mixed vector / data frame input is an error @@ -36,13 +39,14 @@ (expect_error(unnest(df, x))) Output - Can't combine `..1` and `..2` . + Error: + ! Can't combine `..1` and `..2` . # warn about old style interface Code out <- nest(df, y) - Warning + Warning All elements of `...` must be named. Did you want `data = y`? @@ -50,7 +54,7 @@ Code out <- nest(df, -y) - Warning + Warning All elements of `...` must be named. Did you want `data = -y`? @@ -58,7 +62,7 @@ Code out <- nest(df, x, y, foo = z) - Warning + Warning All elements of `...` must be named. Did you want `data = c(x, y)`? @@ -66,7 +70,7 @@ Code out <- nest(df, x, starts_with("z")) - Warning + Warning All elements of `...` must be named. Did you want `data = c(x, starts_with("z"))`? @@ -74,7 +78,7 @@ Code out <- nest(df, y, .key = "y") - Warning + Warning All elements of `...` must be named. Did you want `y = y`? @@ -82,21 +86,21 @@ Code out <- nest(df, .key = "y") - Warning + Warning `.key` is deprecated # .key gets warning with new interface Code out <- nest(df, y = y, .key = "y") - Warning + Warning `.key` is deprecated # cols must go in cols Code unnest(df, x, y) - Warning + Warning unnest() has a new interface. See ?unnest for details. Try `df %>% unnest(c(x, y))`, with `mutate()` if needed Output @@ -110,7 +114,7 @@ Code unnest(df) - Warning + Warning `cols` is now required when using unnest(). Please use `cols = c(y)` Output @@ -132,7 +136,7 @@ Code out <- df %>% unnest(z = map(y, `+`, 1)) - Warning + Warning unnest() has a new interface. See ?unnest for details. Try `df %>% unnest(c(z))`, with `mutate()` if needed diff --git a/tests/testthat/_snaps/pack.md b/tests/testthat/_snaps/pack.md index bd213ffe5..6caad62c1 100644 --- a/tests/testthat/_snaps/pack.md +++ b/tests/testthat/_snaps/pack.md @@ -4,10 +4,12 @@ (expect_error(pack(df, a = c(a1, a2), c(b1, b2)))) Output - All elements of `...` must be named + Error in `pack()`: + ! All elements of `...` must be named Code (expect_error(pack(df, c(a1, a2), c(b1, b2)))) Output - All elements of `...` must be named + Error in `pack()`: + ! All elements of `...` must be named diff --git a/tests/testthat/_snaps/pivot-long.md b/tests/testthat/_snaps/pivot-long.md index a1da8c717..d459f8d2d 100644 --- a/tests/testthat/_snaps/pivot-long.md +++ b/tests/testthat/_snaps/pivot-long.md @@ -4,7 +4,8 @@ (expect_error(pivot_longer(df, y, names_to = "x"))) Output - Names must be unique. + Error in `vec_cbind()`: + ! Names must be unique. x These names are duplicated: * "x" at locations 1 and 2. i Use argument `names_repair` to specify repair strategy. @@ -13,10 +14,10 @@ Code out <- pivot_longer(df, y, names_to = "x", names_repair = "unique") - Message + Message New names: - * x -> x...1 - * x -> x...2 + * `x` -> `x...1` + * `x` -> `x...2` # multiple names requires names_sep/names_pattern @@ -24,13 +25,15 @@ (expect_error(build_longer_spec(df, x_y, names_to = c("a", "b")))) Output - If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. + Error in `build_longer_spec()`: + ! If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. Code (expect_error(build_longer_spec(df, x_y, names_to = c("a", "b"), names_sep = "x", names_pattern = "x"))) Output - If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. + Error in `build_longer_spec()`: + ! If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. # names_sep fails with single name @@ -38,7 +41,8 @@ (expect_error(build_longer_spec(df, x_y, names_to = "x", names_sep = "_"))) Output - `names_sep` can't be used with a length 1 `names_to`. + Error in `build_longer_spec()`: + ! `names_sep` can't be used with a length 1 `names_to`. # Error if the `col` can't be selected. @@ -46,7 +50,8 @@ (expect_error(pivot_longer(iris, matches("foo")))) Output - `cols` must select at least one column. + Error in `build_longer_spec()`: + ! `cols` must select at least one column. # `names_to` is validated @@ -54,18 +59,21 @@ (expect_error(build_longer_spec(df, x, names_to = 1))) Output - `names_to` must be a character vector or `NULL`. + Error in `build_longer_spec()`: + ! `names_to` must be a character vector or `NULL`. Code (expect_error(build_longer_spec(df, x, names_to = c("x", "y")))) Output - If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. + Error in `build_longer_spec()`: + ! If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. Code (expect_error(build_longer_spec(df, x, names_to = c("x", "y"), names_sep = "_", names_pattern = "x"))) Output - If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. + Error in `build_longer_spec()`: + ! If you supply multiple names in `names_to` you must also supply one of `names_sep` or `names_pattern`. # `names_ptypes` is validated @@ -73,12 +81,14 @@ (expect_error(build_longer_spec(df, x, names_ptypes = 1))) Output - `names_ptypes` must be `NULL`, an empty ptype, or a named list of ptypes. + Error in `check_list_of_ptypes()`: + ! `names_ptypes` must be `NULL`, an empty ptype, or a named list of ptypes. Code (expect_error(build_longer_spec(df, x, names_ptypes = list(integer())))) Output - All elements of `names_ptypes` must be named. + Error in `check_list_of_ptypes()`: + ! All elements of `names_ptypes` must be named. # `names_transform` is validated @@ -86,12 +96,14 @@ (expect_error(build_longer_spec(df, x, names_transform = 1))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. Code (expect_error(build_longer_spec(df, x, names_transform = list(~.x)))) Output - All elements of `names_transform` must be named. + Error in `check_list_of_functions()`: + ! All elements of `names_transform` must be named. # `values_ptypes` is validated @@ -99,12 +111,14 @@ (expect_error(pivot_longer(df, x, values_ptypes = 1))) Output - `values_ptypes` must be `NULL`, an empty ptype, or a named list of ptypes. + Error in `check_list_of_ptypes()`: + ! `values_ptypes` must be `NULL`, an empty ptype, or a named list of ptypes. Code (expect_error(pivot_longer(df, x, values_ptypes = list(integer())))) Output - All elements of `values_ptypes` must be named. + Error in `check_list_of_ptypes()`: + ! All elements of `values_ptypes` must be named. # `values_transform` is validated @@ -112,10 +126,12 @@ (expect_error(pivot_longer(df, x, values_transform = 1))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. Code (expect_error(pivot_longer(df, x, values_transform = list(~.x)))) Output - All elements of `values_transform` must be named. + Error in `check_list_of_functions()`: + ! All elements of `values_transform` must be named. diff --git a/tests/testthat/_snaps/pivot-wide.md b/tests/testthat/_snaps/pivot-wide.md index 2fdb39fab..b563788b9 100644 --- a/tests/testthat/_snaps/pivot-wide.md +++ b/tests/testthat/_snaps/pivot-wide.md @@ -4,7 +4,8 @@ (expect_error(pivot_wider(df, names_from = key, values_from = val))) Output - Names must be unique. + Error in `vec_cbind()`: + ! Names must be unique. x These names are duplicated: * "a" at locations 1 and 2. i Use argument `names_repair` to specify repair strategy. @@ -13,10 +14,10 @@ Code out <- pivot_wider(df, names_from = key, values_from = val, names_repair = "unique") - Message + Message New names: - * a -> a...1 - * a -> a...2 + * `a` -> `a...1` + * `a` -> `a...2` # `names_from` must be supplied if `name` isn't in `data` (#1240) @@ -24,7 +25,8 @@ (expect_error(pivot_wider(df, values_from = val))) Output - Can't subset columns that don't exist. + Error in `build_wider_spec()`: + ! Can't select columns that don't exist. x Column `name` doesn't exist. # `values_from` must be supplied if `value` isn't in `data` (#1240) @@ -33,7 +35,8 @@ (expect_error(pivot_wider(df, names_from = key))) Output - Can't subset columns that don't exist. + Error in `build_wider_spec()`: + ! Can't select columns that don't exist. x Column `value` doesn't exist. # `names_from` must identify at least 1 column (#1240) @@ -43,7 +46,8 @@ ) Output - `names_from` must select at least one column. + Error in `build_wider_spec()`: + ! `names_from` must select at least one column. # `values_from` must identify at least 1 column (#1240) @@ -52,7 +56,8 @@ ) Output - `values_from` must select at least one column. + Error in `build_wider_spec()`: + ! `values_from` must select at least one column. # `values_fn` emits an informative error when it doesn't result in unique values (#1238) @@ -60,7 +65,8 @@ (expect_error(pivot_wider(df, values_fn = list(value = ~.x)))) Output - Applying `values_fn` to `value` must result in a single summary value per key. + Error in `value_summarize()`: + ! Applying `values_fn` to `value` must result in a single summary value per key. x Applying `values_fn` resulted in a value with length 2. # `names_vary` is validated @@ -69,12 +75,14 @@ (expect_error(build_wider_spec(df, names_vary = 1))) Output - `names_vary` must be a character vector. + Error in `build_wider_spec()`: + ! `names_vary` must be a string or character vector. Code (expect_error(build_wider_spec(df, names_vary = "x"))) Output - `names_vary` must be one of "fastest" or "slowest". + Error in `build_wider_spec()`: + ! `names_vary` must be one of "fastest" or "slowest", not "x". # `names_expand` is validated @@ -82,12 +90,14 @@ (expect_error(build_wider_spec(df, names_expand = 1))) Output - `names_expand` must be a single `TRUE` or `FALSE`. + Error in `build_wider_spec()`: + ! `names_expand` must be a single `TRUE` or `FALSE`. Code (expect_error(build_wider_spec(df, names_expand = "x"))) Output - `names_expand` must be a single `TRUE` or `FALSE`. + Error in `build_wider_spec()`: + ! `names_expand` must be a single `TRUE` or `FALSE`. # `id_expand` is validated @@ -95,18 +105,20 @@ (expect_error(pivot_wider(df, id_expand = 1))) Output - `id_expand` must be a single `TRUE` or `FALSE`. + Error in `pivot_wider_spec()`: + ! `id_expand` must be a single `TRUE` or `FALSE`. Code (expect_error(pivot_wider(df, id_expand = "x"))) Output - `id_expand` must be a single `TRUE` or `FALSE`. + Error in `pivot_wider_spec()`: + ! `id_expand` must be a single `TRUE` or `FALSE`. # duplicated keys produce list column with warning Code pv <- pivot_wider(df, names_from = key, values_from = val) - Warning + Warning Values from `val` are not uniquely identified; output will contain list-cols. * Use `values_fn = list` to suppress this warning. * Use `values_fn = {summary_fun}` to summarise duplicates. @@ -120,7 +132,7 @@ Code pivot_wider(df, names_from = key, values_from = c(a, b, c)) - Warning + Warning Values from `a`, `b` and `c` are not uniquely identified; output will contain list-cols. * Use `values_fn = list` to suppress this warning. * Use `values_fn = {summary_fun}` to summarise duplicates. @@ -139,7 +151,7 @@ Code pivot_wider(df, names_from = key, values_from = c(a, b, c), values_fn = list(b = sum)) - Warning + Warning Values from `a` and `c` are not uniquely identified; output will contain list-cols. * Use `values_fn = list` to suppress this warning. * Use `values_fn = {summary_fun}` to summarise duplicates. @@ -158,7 +170,7 @@ Code pv <- pivot_wider(df, names_from = `the-key`, values_from = val) - Warning + Warning Values from `val` are not uniquely identified; output will contain list-cols. * Use `values_fn = list` to suppress this warning. * Use `values_fn = {summary_fun}` to summarise duplicates. @@ -174,7 +186,8 @@ (expect_error(pivot_wider(df, values_fn = 1))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. # `unused_fn` must result in single summary values @@ -182,7 +195,8 @@ (expect_error(pivot_wider(df, id_cols = id, unused_fn = identity))) Output - Applying `unused_fn` to `unused` must result in a single summary value per key. + Error in `value_summarize()`: + ! Applying `unused_fn` to `unused` must result in a single summary value per key. x Applying `unused_fn` resulted in a value with length 2. # `unused_fn` is validated @@ -191,5 +205,6 @@ (expect_error(pivot_wider(df, id_cols = id, unused_fn = 1))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. diff --git a/tests/testthat/_snaps/pivot.md b/tests/testthat/_snaps/pivot.md index 0d658f7e2..77ab4f229 100644 --- a/tests/testthat/_snaps/pivot.md +++ b/tests/testthat/_snaps/pivot.md @@ -4,12 +4,14 @@ (expect_error(check_pivot_spec(1))) Output - `spec` must be a data frame. + Error in `check_pivot_spec()`: + ! `spec` must be a data frame. Code (expect_error(check_pivot_spec(mtcars))) Output - `spec` must have `.name` and `.value` columns. + Error in `check_pivot_spec()`: + ! `spec` must have `.name` and `.value` columns. # `.name` column must be a character vector @@ -17,7 +19,8 @@ (expect_error(check_pivot_spec(df))) Output - The `.name` column of `spec` must be a character vector. + Error in `check_pivot_spec()`: + ! The `.name` column of `spec` must be a character vector. # `.value` column must be a character vector @@ -25,7 +28,8 @@ (expect_error(check_pivot_spec(df))) Output - The `.value` column of `spec` must be a character vector. + Error in `check_pivot_spec()`: + ! The `.value` column of `spec` must be a character vector. # `.name` column must be unique @@ -33,5 +37,6 @@ (expect_error(check_pivot_spec(df))) Output - The `.name` column of `spec` must be unique. + Error in `check_pivot_spec()`: + ! The `.name` column of `spec` must be unique. diff --git a/tests/testthat/_snaps/rectangle.md b/tests/testthat/_snaps/rectangle.md index a5f9d6432..87d43ac3f 100644 --- a/tests/testthat/_snaps/rectangle.md +++ b/tests/testthat/_snaps/rectangle.md @@ -4,7 +4,8 @@ (expect_error(hoist(df, x, "b", .ptype = list(b = double())))) Output - Can't convert to . + Error in `col_simplify()`: + ! Can't convert `..1` to . # non-vectors generate a cast error if a ptype is supplied @@ -12,7 +13,8 @@ (expect_error(hoist(df, x, "b", .ptype = list(b = integer())))) Output - Input must be a vector, not a symbol. + Error in `col_simplify()`: + ! `..1` must be a vector, not a symbol. # input validation catches problems @@ -20,17 +22,20 @@ (expect_error(df %>% hoist(y))) Output - `.col` must identify a list-column. + Error in `hoist()`: + ! `.col` must identify a list-column. Code (expect_error(df %>% hoist(x, 1))) Output - All elements of `...` must be named. + Error in `check_pluckers()`: + ! All elements of `...` must be named. Code (expect_error(df %>% hoist(x, a = "a", a = "b"))) Output - The names of `...` must be unique. + Error in `check_pluckers()`: + ! The names of `...` must be unique. # can't hoist() from a data frame column @@ -38,7 +43,8 @@ (expect_error(hoist(df, a, xx = 1))) Output - `.col` must identify a list-column. + Error in `hoist()`: + ! `.col` must identify a list-column. # hoist() input must be a data frame (#1224) @@ -46,7 +52,8 @@ (expect_error(hoist(1))) Output - `.data` must be a data frame. + Error in `hoist()`: + ! `.data` must be a data frame. # unnest_wider - bad inputs generate errors @@ -54,52 +61,53 @@ (expect_error(unnest_wider(df, y))) Output - Column `y` must contain a list of vectors. + Error in `.f()`: + ! Column `y` must contain a list of vectors. # can unnest a vector with a mix of named/unnamed elements (#1200 comment) Code out <- unnest_wider(df, x, names_sep = "_") - Message + Message New names: - * `` -> ...1 + * `` -> `...1` # unique name repair is done on the elements before applying `names_sep` (#1200 comment) Code out <- unnest_wider(df, col, names_sep = "_") - Message + Message New names: - * `` -> ...1 + * `` -> `...1` --- Code out <- unnest_wider(df, col, names_sep = "_") - Message + Message New names: - * `` -> ...1 - * `` -> ...2 + * `` -> `...1` + * `` -> `...2` # output structure is the same whether or not `names_sep` is applied (#1200 comment) Code out1 <- unnest_wider(df, col) - Message + Message New names: - * `` -> ...1 + * `` -> `...1` New names: - * `` -> ...1 + * `` -> `...1` --- Code out2 <- unnest_wider(df, col, names_sep = "_") - Message + Message New names: - * NA -> ...1 + * `` -> `...1` New names: - * `` -> ...1 + * `` -> `...1` # can't currently combine compatible ` + >` @@ -107,7 +115,8 @@ (expect_error(unnest_wider(df, col))) Output - Can't combine `..1$a` and `..3$a` >. + Error in `col_to_wide()`: + ! Can't combine `..1$a` and `..3$a` >. # unnest_wider() input must be a data frame (#1224) @@ -115,7 +124,8 @@ (expect_error(unnest_wider(1))) Output - `data` must be a data frame. + Error in `unnest_wider()`: + ! `data` must be a data frame. # unnest_longer - bad inputs generate errors @@ -123,7 +133,8 @@ (expect_error(unnest_longer(df, y))) Output - Column `y` must contain a list of vectors. + Error in `elt_to_long()`: + ! Column `y` must contain a list of vectors. # can't mix `indices_to` with `indices_include = FALSE` @@ -132,7 +143,8 @@ ) Output - Can't set `indices_include` to `FALSE` when `indices_to` is supplied. + Error in `unnest_longer()`: + ! Can't set `indices_include` to `FALSE` when `indices_to` is supplied. # unnest_longer() input must be a data frame (#1224) @@ -140,7 +152,8 @@ (expect_error(unnest_longer(1))) Output - `data` must be a data frame. + Error in `unnest_longer()`: + ! `data` must be a data frame. # `values_to` is validated @@ -148,12 +161,14 @@ (expect_error(unnest_longer(mtcars, mpg, values_to = 1))) Output - `values_to` must be a single string or `NULL`. + Error in `unnest_longer()`: + ! `values_to` must be a single string or `NULL`. Code (expect_error(unnest_longer(mtcars, mpg, values_to = c("x", "y")))) Output - `values_to` must be a single string or `NULL`. + Error in `unnest_longer()`: + ! `values_to` must be a single string or `NULL`. # `indices_to` is validated @@ -161,12 +176,14 @@ (expect_error(unnest_longer(mtcars, mpg, indices_to = 1))) Output - `indices_to` must be a single string or `NULL`. + Error in `unnest_longer()`: + ! `indices_to` must be a single string or `NULL`. Code (expect_error(unnest_longer(mtcars, mpg, indices_to = c("x", "y")))) Output - `indices_to` must be a single string or `NULL`. + Error in `unnest_longer()`: + ! `indices_to` must be a single string or `NULL`. # `indices_include` is validated @@ -174,12 +191,14 @@ (expect_error(unnest_longer(mtcars, mpg, indices_include = 1))) Output - `indices_include` must be `NULL` or a single `TRUE` or `FALSE`. + Error in `unnest_longer()`: + ! `indices_include` must be `NULL` or a single `TRUE` or `FALSE`. Code (expect_error(unnest_longer(mtcars, mpg, indices_include = c(TRUE, FALSE)))) Output - `indices_include` must be `NULL` or a single `TRUE` or `FALSE`. + Error in `unnest_longer()`: + ! `indices_include` must be `NULL` or a single `TRUE` or `FALSE`. # `simplify` is validated @@ -187,27 +206,32 @@ (expect_error(df_simplify(data.frame(), simplify = 1))) Output - `simplify` must be a list or a single `TRUE` or `FALSE`. + Error in `df_simplify()`: + ! `simplify` must be a list or a single `TRUE` or `FALSE`. Code (expect_error(df_simplify(data.frame(), simplify = NA))) Output - `simplify` must be a list or a single `TRUE` or `FALSE`. + Error in `df_simplify()`: + ! `simplify` must be a list or a single `TRUE` or `FALSE`. Code (expect_error(df_simplify(data.frame(), simplify = c(TRUE, FALSE)))) Output - `simplify` must be a list or a single `TRUE` or `FALSE`. + Error in `df_simplify()`: + ! `simplify` must be a list or a single `TRUE` or `FALSE`. Code (expect_error(df_simplify(data.frame(), simplify = list(1)))) Output - All elements of `simplify` must be named. + Error in `df_simplify()`: + ! All elements of `simplify` must be named. Code (expect_error(df_simplify(data.frame(), simplify = list(x = 1, x = 1)))) Output - The names of `simplify` must be unique. + Error in `df_simplify()`: + ! The names of `simplify` must be unique. # `ptype` is validated @@ -215,17 +239,20 @@ (expect_error(df_simplify(data.frame(), ptype = 1))) Output - `ptype` must be `NULL`, an empty ptype, or a named list of ptypes. + Error in `check_list_of_ptypes()`: + ! `ptype` must be `NULL`, an empty ptype, or a named list of ptypes. Code (expect_error(df_simplify(data.frame(), ptype = list(1)))) Output - All elements of `ptype` must be named. + Error in `check_list_of_ptypes()`: + ! All elements of `ptype` must be named. Code (expect_error(df_simplify(data.frame(), ptype = list(x = 1, x = 1)))) Output - The names of `ptype` must be unique. + Error in `check_list_of_ptypes()`: + ! The names of `ptype` must be unique. # `transform` is validated @@ -233,30 +260,35 @@ (expect_error(df_simplify(data.frame(), transform = list(~.x)))) Output - All elements of `transform` must be named. + Error in `check_list_of_functions()`: + ! All elements of `transform` must be named. Code (expect_error(df_simplify(data.frame(x = 1), transform = 1))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. Code (expect_error(df_simplify(data.frame(), transform = list(x = 1)))) Output - Can't convert a double vector to function + Error in `map()`: + ! Can't convert `.x[[i]]`, a number, to a function. Code (expect_error(df_simplify(data.frame(), transform = list(x = 1, x = 1)))) Output - The names of `transform` must be unique. + Error in `check_list_of_functions()`: + ! The names of `transform` must be unique. # ptype is applied after transform Code - (expect_error(col_simplify(list(1, 2, 3), ptype = integer(), transform = ~.x + + (expect_error(col_simplify(list(1, 2, 3), ptype = integer(), transform = ~ .x + 1.5))) Output - Can't convert from to due to loss of precision. + Error in `col_simplify()`: + ! Can't convert from `..1` to due to loss of precision. * Locations: 1 diff --git a/tests/testthat/_snaps/replace_na.md b/tests/testthat/_snaps/replace_na.md index 615f0eb79..c89303c4d 100644 --- a/tests/testthat/_snaps/replace_na.md +++ b/tests/testthat/_snaps/replace_na.md @@ -4,7 +4,8 @@ (expect_error(replace_na(1, 1:10))) Output - Replacement for `data` is length 10, not length 1. + Error in `check_replacement()`: + ! Replacement for `data` is length 10, not length 1. # replacement must be castable to `data` @@ -12,7 +13,8 @@ (expect_error(replace_na(x, 1.5))) Output - Can't convert from `replace` to `data` due to loss of precision. + Error in `vec_assign()`: + ! Can't convert from `replace` to `data` due to loss of precision. * Locations: 1 # replacement must be castable to corresponding column @@ -21,6 +23,7 @@ (expect_error(replace_na(df, list(a = 1.5)))) Output - Can't convert from `replace$a` to `data$a` due to loss of precision. + Error in `vec_assign()`: + ! Can't convert from `replace$a` to `data$a` due to loss of precision. * Locations: 1 diff --git a/tests/testthat/_snaps/separate.md b/tests/testthat/_snaps/separate.md index 855240863..8f68aa5e7 100644 --- a/tests/testthat/_snaps/separate.md +++ b/tests/testthat/_snaps/separate.md @@ -2,7 +2,7 @@ Code separate(df, x, c("x", "y")) - Warning + Warning Expected 2 pieces. Additional pieces discarded in 1 rows [2]. Output # A tibble: 2 x 2 @@ -15,7 +15,7 @@ Code separate(df, x, c("x", "y"), extra = "error") - Warning + Warning `extra = "error"` is deprecated. Please use `extra = "warn"` instead Expected 2 pieces. Additional pieces discarded in 1 rows [2]. Output @@ -29,7 +29,7 @@ Code separate(df, x, c("x", "y", "z")) - Warning + Warning Expected 3 pieces. Missing pieces filled with `NA` in 1 rows [1]. Output # A tibble: 2 x 3 @@ -44,12 +44,14 @@ (expect_error(separate(df, x, "x", FALSE))) Output - `sep` must be either numeric or character + Error in `str_separate()`: + ! `sep` must be either numeric or character Code (expect_error(separate(df, x, FALSE))) Output - `into` must be a character vector + Error in `str_separate()`: + ! `into` must be a character vector # informative error if using stringr modifier functions (#693) @@ -57,5 +59,6 @@ (expect_error(separate(df, x, sep = sep))) Output - `sep` can't use modifiers from stringr. + Error in `check_not_stringr_pattern()`: + ! `sep` can't use modifiers from stringr. diff --git a/tests/testthat/_snaps/spread.md b/tests/testthat/_snaps/spread.md index f14d14b2b..1d2ac15c1 100644 --- a/tests/testthat/_snaps/spread.md +++ b/tests/testthat/_snaps/spread.md @@ -4,7 +4,8 @@ (expect_error(spread(df, x, y))) Output - Each row of output must be identified by a unique combination of keys. + Error in `spread()`: + ! Each row of output must be identified by a unique combination of keys. Keys are shared for 2 rows: * 2, 3 diff --git a/tests/testthat/_snaps/uncount.md b/tests/testthat/_snaps/uncount.md index e827fc760..235e7c507 100644 --- a/tests/testthat/_snaps/uncount.md +++ b/tests/testthat/_snaps/uncount.md @@ -4,5 +4,6 @@ (expect_error(uncount(df, w))) Output - all elements of `weights` must be >= 0 + Error in `uncount()`: + ! all elements of `weights` must be >= 0 diff --git a/tidyr.Rproj b/tidyr.Rproj index 4166c0825..cba1b6b7a 100644 --- a/tidyr.Rproj +++ b/tidyr.Rproj @@ -3,7 +3,6 @@ Version: 1.0 RestoreWorkspace: No SaveWorkspace: No AlwaysSaveHistory: Default -QuitChildProcessesOnExit: Default EnableCodeIndexing: Yes UseSpacesForTab: Yes diff --git a/vignettes/in-packages.Rmd b/vignettes/in-packages.Rmd index 691db5ab5..d18511dbe 100644 --- a/vignettes/in-packages.Rmd +++ b/vignettes/in-packages.Rmd @@ -123,7 +123,7 @@ GitHub Actions are an evolving landscape, so you can always mine the workflows f v1.0.0 makes considerable changes to the interface of `nest()` and `unnest()` in order to bring them in line with newer tidyverse conventions. I have tried to make the functions as backward compatible as possible and to give informative warning messages, but I could not cover 100% of use cases, so you may need to change your package code. This guide will help you do so with a minimum of pain. -Ideally, you'll tweak your package so that it works with both tidyr 0.8.3 and tidyr 1.0.0. This makes life considerably easier because it means there's no need to coordinate CRAN submissions - you can submit your package that works with both tidyr versions, before I submit tidyr to CRAN. This section describes our recommend practices for doing so, drawing from the general principles described in . +Ideally, you'll tweak your package so that it works with both tidyr 0.8.3 and tidyr 1.0.0. This makes life considerably easier because it means there's no need to coordinate CRAN submissions - you can submit your package that works with both tidyr versions, before I submit tidyr to CRAN. This section describes our recommend practices for doing so, drawing from the general principles described in . If you use continuous integration already, we **strongly** recommend adding a build that tests with the development version of tidyr; see above for details. @@ -180,7 +180,7 @@ What changed: Why it changed: * The use of `...` for metadata is a problematic pattern we're moving away from. - + * The `new_col = ` construct lets us create multiple nested list-columns at once ("multi-nest"). @@ -247,7 +247,7 @@ What changed: Why it changed: * The use of `...` for metadata is a problematic pattern we're moving away from. - + * The changes to details arguments relate to features rolling out across multiple packages in the tidyverse. For example, `ptype` exposes