write_dcs: Write DCS

View source: R/write_dcs.R

write_dcsR Documentation

Write DCS

Description

Write a DCS formatted dataset to a file that can be uploaded to the Data Collection System.

Usage

write_dcs(df, path, type = c("data", "meta"))

Arguments

df

data.frame: A DCS formatted data frame. Output of format_dcs().

path

character: A file name to write to.

type

character: Type, either 'data' or 'meta'.

Details

[Stable]

Examples

## Not run: 
# Load example data
data("bednets")

# Write DCS 'data' format
df <- format_dcs(bednets, type = "data")
write_dcs(df, path = "data-bednets.xlsx", type = "data")

# Write DCS 'metadata' format
df <- format_dcs(bednets, type = "meta")
write_dcs(df, path = "meta-bednets.xlsx", type = "meta")

## End(Not run)

worldbank/pddcs documentation built on Nov. 20, 2024, 5:41 a.m.