dic_value_extract_one_dataset: extract information from one single dataset provided as data...

Description Usage Arguments Value Examples

View source: R/dic_value_extract.R

Description

extract information from one single dataset provided as data frame

Usage

1

Arguments

.data

the dataframe from which key values will be extracted

Value

a dataframe including the values extracted from each variable in the dataset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
require(haven)
# mtcars.sas7bdat was generated from R mtcars dataset
df <- system.file("extdata", "mtcars.sas7bdat", package = "createdictionary")
df %>%
read_sas() %>%
  dic_value_extract_one_dataset()
# should work if there exist sas7bdat datasets in R path.
# The package "haven" have such datasets.

df <- system.file(package = "haven")
dse <- flat2file(df, "*.sas7bdat")
dse[1] %>%
 read_sas() %>%
 dic_value_extract_one_dataset()

# need access to the specified folder and have sas7bdat datasets there
df <- "/LSC/NES/study/CARDIA/core datasets/Y25/DATA"
dse <- flat2file(df, "*.sas7bdat")
d <- dse[3] %>% read_sas()
d %>% dic_value_extract_one_dataset()

LEPSNES/createdictionary documentation built on Dec. 13, 2021, 1:51 a.m.