diff --git a/dev/LICENSE-text.html b/dev/LICENSE-text.html index 0384b35a..48dee6a5 100644 --- a/dev/LICENSE-text.html +++ b/dev/LICENSE-text.html @@ -10,7 +10,7 @@ xportr - 0.3.1.9006 + 0.3.1.9007 + + + + + +
+
+
+ +
+

There are two mechanisms for working with options for xportr. One is the +options() function, which is part of base R, and the other is the +xportr_options() function, which is in the xportr package. The reason for +these two mechanisms is has to do with legacy code and scoping.

+

The options() function sets options globally, for the duration of the R +process. The getOption() function retrieves the value of an option. All +xportr related options of this type are prefixed with "xportr.".

+
+ +
+

Usage

+
xportr_options(...)
+
+ +
+

Arguments

+
...
+

Options to set, with the form name = value or a character vector of option names.

+ +
+
+

Options with options()

+ + + +
xportr.df_domain_name
+

defaults to "dataset"

+: +The name of the domain "name" column in dataset metadata. +
xportr.df_label
+

defaults to "label"

+: +The column noting the dataset label in dataset metadata. +
xportr.domain_name
+

defaults to "dataset"

+: +The name of the domain "name" column in variable metadata. +
xportr.variable_name
+

defaults to "variable"

+: +The name of the variable "name" in variable metadata. +
xportr.type_name
+

defaults to "type"

+: +The name of the variable type column in variable metadata. +
xportr.label
+

defaults to "label"

+: +The name of the variable label column in variable metadata. +
xportr.length
+

defaults to "length"

+: +The name of the variable length column in variable metadata. +
xportr.order_name
+

defaults to "order"

+: +The name of the variable order column in variable metadata. +
xportr.format_name
+

defaults to "format"

+: +The name of the variable format column in variable metadata. +
xportr.format_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_format. +
xportr.label_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_label. +
xportr.length_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_length. +
xportr.type_verbose
+

defaults to "label"

+: +The default argument for the 'verbose' argument for xportr_type. +
xportr.character_types
+

defaults to c("character", "char", "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", "intervaldatetime")

+: +The default character vector used to explicitly coerce R classes to character XPT types. +
xportr.numeric_types
+

defaults to c("integer", "numeric", "num", "float")

+: +The default character vector used to explicitly coerce R classes to numeric XPT types. + +
+
+

Options with xportr_options()

+ + + +

Alternative to the options(), the xportr_options() function can be used to set the options. +The xportr_options() function also returns the current options when a character vector of +the options keys are passed into it. If nothing is passed into it, it returns the state of all xportr options.

+
+ +
+

Examples

+
xportr_options("xportr.df_label")
+#> $xportr.df_label
+#> [1] "label"
+#> 
+xportr_options(xportr.df_label = "data_label", xportr.label = "custom_label")
+xportr_options(c("xportr.label", "xportr.df_label"))
+#> $xportr.label
+#> [1] "custom_label"
+#> 
+#> $xportr.df_label
+#> [1] "data_label"
+#> 
+xportr_options()
+#> $xportr.df_domain_name
+#> [1] "dataset"
+#> 
+#> $xportr.df_label
+#> [1] "data_label"
+#> 
+#> $xportr.domain_name
+#> [1] "dataset"
+#> 
+#> $xportr.variable_name
+#> [1] "variable"
+#> 
+#> $xportr.type_name
+#> [1] "type"
+#> 
+#> $xportr.label
+#> [1] "custom_label"
+#> 
+#> $xportr.length
+#> [1] "length"
+#> 
+#> $xportr.order_name
+#> [1] "order"
+#> 
+#> $xportr.format_name
+#> [1] "format"
+#> 
+#> $xportr.format_verbose
+#> [1] "none"
+#> 
+#> $xportr.label_verbose
+#> [1] "none"
+#> 
+#> $xportr.length_verbose
+#> [1] "none"
+#> 
+#> $xportr.type_verbose
+#> [1] "none"
+#> 
+#> $xportr.character_types
+#>  [1] "character"          "char"               "text"              
+#>  [4] "date"               "posixct"            "posixt"            
+#>  [7] "datetime"           "time"               "partialdate"       
+#> [10] "partialtime"        "partialdatetime"    "incompletedatetime"
+#> [13] "durationdatetime"   "intervaldatetime"  
+#> 
+#> $xportr.numeric_types
+#> [1] "integer" "numeric" "num"     "float"  
+#> 
+
+
+
+ + +
+ + + + + + + diff --git a/dev/reference/xportr_options_list.html b/dev/reference/xportr_options_list.html new file mode 100644 index 00000000..ef96bffd --- /dev/null +++ b/dev/reference/xportr_options_list.html @@ -0,0 +1,96 @@ + +A list with all the supported options of xportr — xportr_options_list • xportr + Skip to contents + + +
+
+
+ +
+

An internal list with all the supported options of xportr with defaults

+
+ +
+

Usage

+
xportr_options_list
+
+ +
+

Format

+

An object of class list of length 15.

+
+ +
+ + +
+ + + + + + + diff --git a/dev/reference/xportr_order.html b/dev/reference/xportr_order.html index fb6ec2f2..58d796a9 100644 --- a/dev/reference/xportr_order.html +++ b/dev/reference/xportr_order.html @@ -14,7 +14,7 @@ xportr - 0.3.1.9006 + 0.3.1.9007