11# MIT License
22#
3- # Copyright (c) 2017-2023 TileDB Inc.
3+ # Copyright (c) 2017-2025 TileDB Inc.
44#
55# Permission is hereby granted, free of charge, to any person obtaining a copy
66# of this software and associated documentation files (the "Software"), to deal
@@ -34,7 +34,7 @@ tiledb_config.from_ptr <- function(ptr) {
3434 new(" tiledb_config" , ptr = ptr )
3535}
3636
37- # ' Creates a `tiledb_config` object
37+ # ' Creates a TileDB Config object
3838# '
3939# ' Note that for actually setting persistent values, the (altered) config
4040# ' object needs to used to create (or update) the \code{tiledb_ctx} object. Similarly,
@@ -70,12 +70,13 @@ tiledb_config <- function(config = NA_character_) {
7070
7171# ' Gets a config parameter value
7272# '
73- # ' @param x `tiledb_config` object
73+ # ' @param x A `tiledb_config` object
7474# ' @param i parameter key string
7575# ' @param j parameter key string, currently unused.
7676# ' @param ... Extra parameter for method signature, currently unused.
7777# ' @param drop Optional logical switch to drop dimensions, default FALSE, currently unused.
78- # ' @return a config string value if parameter exists, else NA
78+ # ' @return A config string value if parameter exists, else NA
79+ # '
7980# ' @examples
8081# ' \dontshow{
8182# ' ctx <- tiledb_ctx(limitTileDBCores())
@@ -97,11 +98,11 @@ setMethod("[", "tiledb_config", function(x, i, j, ..., drop = FALSE) {
9798
9899# ' Sets a config parameter value
99100# '
100- # ' @param x `tiledb_config` object
101+ # ' @param x A `tiledb_config` object
101102# ' @param i parameter key string
102103# ' @param j parameter key string
103104# ' @param value value to set, will be converted into a stringa
104- # ' @return updated `tiledb_config` object
105+ # ' @return The updated `tiledb_config` object
105106# ' @examples
106107# ' \dontshow{
107108# ' ctx <- tiledb_ctx(limitTileDBCores())
@@ -134,7 +135,7 @@ setMethod("[<-", "tiledb_config", function(x, i, j, value) {
134135
135136# ' Prints the config object to STDOUT
136137# '
137- # ' @param object `tiledb_config` object
138+ # ' @param object A `tiledb_config` object
138139# ' @examples
139140# ' \dontshow{
140141# ' ctx <- tiledb_ctx(limitTileDBCores())
@@ -146,9 +147,9 @@ setMethod("show", signature(object = "tiledb_config"), function(object) {
146147 libtiledb_config_dump(object @ ptr )
147148})
148149
149- # ' Save a `tiledb_config` object ot a local text file
150+ # ' Save a TileDB Config object to a local text file
150151# '
151- # ' @param config The `tiledb_config` object
152+ # ' @param config A `tiledb_config` object
152153# ' @param path The path to config file to be created
153154# ' @return path to created config file
154155# ' @examples
@@ -170,9 +171,9 @@ tiledb_config_save <- function(config, path) {
170171 libtiledb_config_save_to_file(config @ ptr , path )
171172}
172173
173- # ' Load a saved `tiledb_config` file from disk
174+ # ' Load a saved TileDB Config file from disk
174175# '
175- # ' @param path path to the config file
176+ # ' @param path The path to the config file to be loaded
176177# ' @examples
177178# ' \dontshow{
178179# ' ctx <- tiledb_ctx(limitTileDBCores())
@@ -190,11 +191,12 @@ tiledb_config_load <- function(path) {
190191 tiledb_config.from_ptr(ptr )
191192}
192193
193- # ' Convert a `tiledb_config` object to a R vector
194+ # ' Convert a TileDB Config object to a R vector
195+ # '
196+ # ' @param x A `tiledb_config` object
197+ # ' @param mode A character value `"any"`, currently unused
194198# '
195- # ' @param x `tiledb_config` object
196- # ' @param mode Character value `"any"`, currently unused
197- # ' @return a character vector of config parameter names, values
199+ # ' @return A character vector of config parameter names, values
198200# ' @examples
199201# ' \dontshow{
200202# ' ctx <- tiledb_ctx(limitTileDBCores())
@@ -208,8 +210,9 @@ as.vector.tiledb_config <- function(x, mode = "any") {
208210 libtiledb_config_vector(x @ ptr )
209211}
210212
211- # ' Convert a `tiledb_config` object to a R data.frame
212- # ' @param x `tiledb_config` object
213+ # ' Convert a TileDB Config object to `data.frame`
214+ # '
215+ # ' @param x A `tiledb_config` object
213216# ' @param ... Extra parameter for method signature, currently unused.
214217# ' @return a data.frame wth parameter, value columns
215218# ' @examples
@@ -230,7 +233,7 @@ as.data.frame.tiledb_config <- function(x, ...) {
230233# ' By default, TileDB will use all available cores on a given machine. In multi-user or
231234# ' multi-process settings, one may want to reduce the number of core. This function will
232235# ' take a given number, or default to smaller of the \sQuote{Ncpus} options value or the
233- # ' \sQuote{"OMP_THREAD_LIMIT"} enviroment variable (or two as hard fallback).
236+ # ' \sQuote{"OMP_THREAD_LIMIT"} environment variable (or two as hard fallback).
234237# '
235238# ' As this function returns a config object, its intended use is as argument to the context
236239# ' creating functions: \code{ctx <- tiledb_ctx(limitTileDBCores())}. To check that the values
@@ -263,16 +266,17 @@ limitTileDBCores <- function(ncores, verbose = FALSE) {
263266
264267# ' Unset a TileDB Config parameter to its default value
265268# '
266- # ' @param config A TileDB Config object
269+ # ' @param config A `tiledb_config` object
267270# ' @param param A character variable with the parameter name
268- # ' @return The modified TileDB Config object
271+ # ' @return The modified `tiledb_config` object
269272# ' @export
270273tiledb_config_unset <- function (config , param ) {
271274 stopifnot(
272275 `The 'config' argument must be a tiledb_config object` = is(config , " tiledb_config" ),
273276 `The 'param' argument must be of type character` = is.character(param )
274277 )
275- libtiledb_config_unset(config @ ptr , param )
278+ ptr <- libtiledb_config_unset(config @ ptr , param )
279+ tiledb_config.from_ptr(ptr )
276280}
277281
278282# ' Display the 'AsBuilt' JSON string
0 commit comments