ns_write_codebook {nettskjemar} | R Documentation |
Write codebook to file
Description
Save codebook information to a
file for safe keeping. Depending
on the type of codebook (raw or tidy)
the file will either be stored as a
json-file through write_json
or a text table through write.table
.
Usage
ns_write_codebook(codebook, path, ...)
## Default S3 method:
ns_write_codebook(codebook, path, ...)
## S3 method for class 'ns_codebook_raw'
ns_write_codebook(codebook, path, ...)
## S3 method for class 'ns_codebook'
ns_write_codebook(codebook, path, sep = "\t", ...)
Arguments
codebook |
object of class ns_codebook |
path |
filename or path |
... |
arguments to
|
sep |
character. If writing text table, column delimiter. |
Details
Given the two types of codebooks, writes different types of files.
- codebook
- writes a tab-separated table
- codebook_raw
- writes a json-file
Value
no return value. Writes a file to path.
Examples
## Not run:
form_id <- 1100000
my_cb <- ns_get_codebook(form_id)
ns_write_codebook(my_cb, "my/path/codebook_110000.txt")
## End(Not run)
[Package nettskjemar version 1.0.2 Index]