Skip to content

Commit bd77cfd

Browse files
authored
improve package index, remove mention of dplyr::data_frame, improve reference index, link vignette from docs (#169)
* improve package index, remove mention of dplyr::data_frame, improve reference index, link vignette from docs * fix lint + link
1 parent 236bb0b commit bd77cfd

File tree

8 files changed

+19
-15
lines changed

8 files changed

+19
-15
lines changed

R/lookfor.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#' @param x a tibble returned by `look_for()`
2626
#' @return a tibble data frame featuring the variable position, name and
2727
#' description (if it exists) in the original data frame
28+
#' @seealso `vignette("look_for")`
2829
#' @details The function looks into the variable names for matches to the
2930
#' keywords. If available, variable labels are included in the search scope.
3031
#' Variable labels of data.frame imported with \pkg{foreign} or

R/recode.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#'
66
#' @importFrom dplyr recode
77
#' @inheritParams dplyr::recode
8-
#' @param .keep_value_labels If TRUE, keep original value labels.
9-
#' If FALSE, remove value labels.
10-
#' @param .combine_value_labels If TRUE, will combine original value labels
8+
#' @param .keep_value_labels If `TRUE`, keep original value labels.
9+
#' If `FALSE`, remove value labels.
10+
#' @param .combine_value_labels If `TRUE`, will combine original value labels
1111
#' to generate new value labels. Note that unexpected results could be
1212
#' obtained if a same old value is recoded into several different new values.
1313
#' @param .sep Separator to be used when combining value labels.

R/to_labelled.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ memisc_to_labelled <- function(x) {
206206
#' codes
207207
#' @details
208208
#' If you convert a labelled vector into a factor with prefix, i.e. by using
209-
#' [to_factor(levels = "prefixed")][to_factor()], `to_labelled.factor()` is able
210-
#' to reconvert it to a labelled vector with same values and labels.
209+
#' [`to_factor(levels = "prefixed")`][to_factor()], `to_labelled.factor()` is
210+
#' able to reconvert it to a labelled vector with same values and labels.
211211
#' @export
212212
#' @examples
213213
#' # Converting factors to labelled vectors

_pkgdown.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ reference:
2424
- title: Manipulating value labels
2525
desc: Functions to set, manipulate and remove value labels
2626
contents:
27-
- labelled
27+
- haven::labelled
2828
- val_label
2929
- remove_var_label
3030
- sort_val_labels
@@ -34,19 +34,19 @@ reference:
3434
- copy_labels
3535
- update_variable_labels_with
3636
- title: Data dictionary
37-
desc: Functions to look for keywords variable names / labels and create a data dictionary
37+
desc: Functions to look for keywords variable names / labels and create a data dictionary.
3838
contents:
3939
- look_for
4040
- title: Manipulating SPSS style missing values
4141
desc: Functions to set, manipulate and remove SPSS style missing values
4242
contents:
43-
- labelled_spss
43+
- haven::labelled_spss
4444
- na_values
4545
- copy_labels
4646
- remove_user_na
4747
- title: Tagged missing values
4848
contents:
49-
- tagged_na
49+
- haven::tagged_na
5050
- unique_tagged_na
5151
- tagged_na_to_user_na
5252
- title: Converting

man/look_for.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/recode.haven_labelled.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/to_labelled.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/labelled.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ If you are using the `%>%` operator, you can use the functions `set_variable_lab
491491
```{r}
492492
library(dplyr)
493493
494-
df <- data_frame(s1 = c("M", "M", "F"), s2 = c(1, 1, 2)) %>%
494+
df <- tibble(s1 = c("M", "M", "F"), s2 = c(1, 1, 2)) %>%
495495
set_variable_labels(s1 = "Sex", s2 = "Question") %>%
496496
set_value_labels(s1 = c(Male = "M", Female = "F"), s2 = c(Yes = 1, No = 2))
497497
df$s2

0 commit comments

Comments
 (0)