Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed May 21, 2024
1 parent 5231541 commit 1277739
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions R/data_to_wide.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#' @param names_from The name of the column in the original data whose values
#' will be used for naming the new columns created in the widened data. Each
#' unique value in this column will become the name of one of these new columns.
#' In case `names_prefix` is provided, column names will be concatenated with
#' the string given in `names_prefix`.
#' @param names_prefix String added to the start of every variable name. This is
#' particularly useful if `names_from` is a numeric vector and you want to create
#' syntactic variable names.
Expand Down Expand Up @@ -44,16 +46,16 @@
#' single row, with each measurement stored in a separate column. Thus, the
#' necessary information for `data_to_wide()` is:
#'
#' - The name of the column that identifies the groups or repeated measurements
#' (`by`).
#' - The name of the column(s) that identify the groups or repeated measurements
#' (`by`, resp. its alias `id_cols`).
#' - The name of the column whose _values_ will become the new column names
#' (`names_from`). Since these values may not necessarily reflect appropriate
#' column names, you can use `names_prefix` to add a prefix to each newly
#' created column name.
#' - The name of the column that contains the values (`values_from`) for the
#' new columns that are created by `names_from`.
#'
#' In other words: Repeated measurements, as indicated by `by`, that are
#' In other words: repeated measurements, as indicated by `by`, that are
#' saved into the column `values_from` will be spread into new columns, which
#' will be named after the values in `names_from`. See also 'Examples'.
#'
Expand Down
10 changes: 6 additions & 4 deletions man/data_to_wide.Rd

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

0 comments on commit 1277739

Please sign in to comment.