desc_get: Return or open a variable description file

Description Usage Arguments Note Author(s) Examples

View source: R/desc_get.R

Description

Returns the text of a variable description file or, if specified, opens it in Word (or system deafult program) instead.

Usage

1
desc_get(path_or_variable, open = F)

Arguments

path_or_variable

Character: Either a full path to a description file or the variable name associated with a description file currently in the PMA variables folder

open

Logical: defaults FALSE. If TRUE, the description file will be opened in Word (or system default program) and will not be returned.

Note

The function desc_make is to be used for creating new description files from a template.

Author(s)

Matt Gunther

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

# Default: Return description as a character string 
desc_get("aborev") 

# Use cat function to show string without control characters
desc_get("aborev") %>% cat() 

# Open in Word
desc_get("aborev", open = T) 

# Specify a file path (e.g. your in_progress folder)
desc_get("./variables/tt_work/Matt/in_progress/aborev_desc.doc") 


## End(Not run)

mgunther87/ipumsPMA documentation built on Aug. 1, 2020, 12:22 a.m.