View source: R/nettskjema-codebook.R
nettskjema_write_codebook | R Documentation |
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
.
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", ...)
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. |
Given the two types of codebooks, writes different types of files.
codebook - writes a tab-separated table
codebook_raw - writes a json-file
no return value. Writes a file to path.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.