Learn R Programming

ffmetadata (version 1.0.0)

search_metadata: Search Metadata

Description

search_metadata allows users to retrieve a list of variable names based on whether or not those variables contain a given query or set of queries within a given field or set of fields

Usage

search_metadata(filter_list = list(), ..., operation = "eq")

Arguments

filter_list

an optional named list that can be passed to search_metadata in addition to explicitly named parameters

...

any valid field name

operation

optional parameter that allows one to specify the given the method of comparison for search, "equals" is the default

Value

returns list of names of all variables that match specified parameter values

Details

List of valid field names:

  • data_source

  • data_type

  • fp_PCG

  • fp_father

  • fp_fchild

  • fp_mother

  • fp_other

  • fp_partner

  • group_id

  • group_subid

  • id

  • label

  • leaf

  • measures

  • name

  • old_name

  • probe

  • qText

  • respondent

  • scope

  • section

  • warning

  • wave

Examples

Run this code
# NOT RUN {
search_test1 <- search_metadata(wave = "Year 1")

search_test2 <- search_metadata(wave = "Year 1", respondent = "Mother")

search_test3 <- search_metadata(wave = "Year 1", name = "f%", operation = c("eq", "like"))

search_test4 <- search_metadata(name = "f1%", operation = "like")

# Note that when using operators checking for null values (or lack thereof), the operation
# parameter should not be included in the call. It should be formatted instead like so:
search_test5 <- search_metadata(qtext = "is_null")
# }

Run the code above in your browser using DataLab