Skip to contents

This function exports variable definitions for a specified Xpose data object to a file.

Usage

export.variable.definitions(object, file = "")

Arguments

object

An xpose.data object.

file

A file name as a string.

Value

Null.

Details

This function exports variable definitions (contents of object@Prefs@Xvardef) for a given xpose.data object to a file, typically 'xpose.vardefs.ini'. Note that file format is not the same as used for graphics settings. It is a wrapper for the R function dput.

Author

Niclas Jonsson & Justin Wilkins

Examples

od = setwd(tempdir()) # move to a temp directory
(cur.files <- dir()) # current files in temp directory
#> [1] "bslib-f00e6fae00d8efe8984ec802f708f91a"
#> [2] "downlit"                               

export.variable.definitions(simpraz.xpdb,file="xpose.vardefs.ini")
(new.files <- dir()[!(dir() %in% cur.files)])  # what files are new here?
#> [1] "xpose.vardefs.ini"

file.remove(new.files) # remove this file
#> [1] TRUE
setwd(od)  # restore working directory