| nettskjema_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
nettskjema_write_codebook(codebook, file, ...)
## Default S3 method:
nettskjema_write_codebook(codebook, file, ...)
## S3 method for class 'nettskjema_codebook_raw'
nettskjema_write_codebook(codebook, file, pretty = TRUE, ...)
## S3 method for class 'nettskjema_codebook'
nettskjema_write_codebook(codebook, file, sep = "\t", ...)
Arguments
| codebook | object of class nettskjema_codebook | 
| file | filename or path | 
| ... | arguments to  | 
| pretty | logical. If writing json-file, make it pretty | 
| 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 <- nettskjema_get_codebook(form_id)
nettskjema_write_codebook(my_cb, "my/path/codebook_110000.txt")
## End(Not run)
[Package nettskjemar version 0.1.4 Index]