Learn R Programming

rdhs (version 0.8.1)

file_dataset_format: Returns what the dataset file ending should be for a given filename

Description

Returns what the dataset file ending should be for a given filename

Usage

file_dataset_format(file_format)

Value

One of "dat","dat","sas7bdat","sav" or "dta"

Arguments

file_format

FileFormat for a file as taken from the API, e.g. dhs_datasets(returnFields = "FileFormat")

Examples

Run this code
file_format <- "Stata dataset (.dta)"
identical(rdhs:::file_dataset_format(file_format),"dta")

Run the code above in your browser using DataLab