Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ LinkingTo: Rcpp, RcppInt64, nanoarrow
Suggests: tinytest, simplermarkdown, curl, bit64, Matrix, palmerpenguins, nycflights13, data.table, tibble, arrow
VignetteBuilder: simplermarkdown
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Encoding: UTF-8
Config/roxygen2/version: 8.1.0
30 changes: 17 additions & 13 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -413,20 +413,24 @@ exportMethods(tile_order)
exportMethods(tiledb_ndim)
import(nanotime)
importFrom(Rcpp,sourceCpp)
importFrom(methods,.hasSlot)
importFrom(methods,as)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,slot)
importFrom(methods,validObject)
importFrom(methods,
.hasSlot,
as,
is,
new,
setClass,
setGeneric,
setMethod,
slot,
validObject
)
importFrom(nanoarrow,as_nanoarrow_array)
importFrom(spdl,set_level)
importFrom(stats,na.omit)
importFrom(utils,head)
importFrom(utils,packageVersion)
importFrom(utils,read.table)
importFrom(utils,tail)
importFrom(utils,
head,
packageVersion,
read.table,
tail
)
useDynLib(tiledb, .registration = TRUE)
2 changes: 1 addition & 1 deletion R/Array.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ tiledb_array_is_homogeneous <- function(arr) {
##' Check for Heterogeneous Domain
##'
##' @param arr A TileDB Array object
##' @return A boolean indicating if the array has heterogenous domains
##' @return A boolean indicating if the array has heterogeneous domains
##' @export
tiledb_array_is_heterogeneous <- function(arr) {
stopifnot("The 'arr' argument must be a tiledb_array object" = .isArray(arr))
Expand Down
2 changes: 1 addition & 1 deletion R/ArrowIO.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tiledb_query_export_buffer <- function(query, name, ctx = tiledb_get_context())
##' Import to Query Buffer from Pair of Arrow IO Pointers
##'
##' This function imports to the named buffer for a \sQuote{WRITE} query
##' from two Arrow exerternal pointers.
##' from two Arrow external pointers.
##' @param query A TileDB Query object
##' @param name A character variable identifying the buffer
##' @param nanoarrowptr A \code{nanoarrow} object (which is an external pointer to an Arrow Array
Expand Down
2 changes: 1 addition & 1 deletion R/Config.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ as.vector.tiledb_config <- function(x, mode = "any") {
#'
#' @param x A `tiledb_config` object
#' @param ... Extra parameter for method signature, currently unused.
#' @return a data.frame wth parameter, value columns
#' @return a data.frame with parameter, value columns
#' @examples
#' cfg <- tiledb_config()
#' as.data.frame(cfg)
Expand Down
2 changes: 1 addition & 1 deletion R/Ctx.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ setMethod(

#' Query if a TileDB backend is supported
#'
#' The scheme corresponds to the URI scheme for TileDB resouces.
#' The scheme corresponds to the URI scheme for TileDB resources.
#'
#' Ex:
#' * `{file}:///path/to/file`
Expand Down
10 changes: 5 additions & 5 deletions R/CurrentDomain.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ setClass("tiledb_current_domain",
#' @export
tiledb_current_domain <- function(ctx = tiledb_get_context()) {
stopifnot(
"The first argment must be a TileDB Ctx object" = is(ctx, "tiledb_ctx"),
"The first argument must be a TileDB Ctx object" = is(ctx, "tiledb_ctx"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
)
ptr <- libtiledb_current_domain_create(ctx@ptr)
Expand All @@ -57,7 +57,7 @@ tiledb_current_domain <- function(ctx = tiledb_get_context()) {
#' @export
tiledb_current_domain_get_type <- function(cd) {
stopifnot(
"The first argment must be a TileDB CurrentDomain object" =
"The first argument must be a TileDB CurrentDomain object" =
is(cd, "tiledb_current_domain"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
)
Expand All @@ -72,7 +72,7 @@ tiledb_current_domain_get_type <- function(cd) {
#' @export
tiledb_current_domain_set_ndrectangle <- function(cd, ndr) {
stopifnot(
"The first argment must be a TileDB CurrentDomain object" =
"The first argument must be a TileDB CurrentDomain object" =
is(cd, "tiledb_current_domain"),
"The second argument must be a TileDB NDRectangle object" = is(ndr, "tiledb_ndrectangle"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
Expand All @@ -88,7 +88,7 @@ tiledb_current_domain_set_ndrectangle <- function(cd, ndr) {
#' @export
tiledb_current_domain_get_ndrectangle <- function(cd) {
stopifnot(
"The first argment must be a TileDB CurrentDomain object" =
"The first argument must be a TileDB CurrentDomain object" =
is(cd, "tiledb_current_domain"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
)
Expand All @@ -103,7 +103,7 @@ tiledb_current_domain_get_ndrectangle <- function(cd) {
#' @export
tiledb_current_domain_is_empty <- function(cd) {
stopifnot(
"The first argment must be a TileDB CurrentDomain object" =
"The first argument must be a TileDB CurrentDomain object" =
is(cd, "tiledb_current_domain"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
)
Expand Down
14 changes: 7 additions & 7 deletions R/DataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
##' writing to the newly-created array) and \sQuote{append} (to only append to an already existing
##' array).
##' @param filter_list A named list specifying filter choices per column, default is an empty
##' \code{list} object. This argument applies for all named arguments and the matchin dimensions
##' \code{list} object. This argument applies for all named arguments and the matching dimensions
##' or attributes. The \code{filter} argument still applies for all unnamed arguments.
##' @param coords_filters A character vector with filters for coordinates, default is \code{ZSTD}.
##' @param offsets_filters A character vector with filters for coordinates, default is \code{ZSTD}.
Expand All @@ -83,16 +83,16 @@
##' all.equal(as.matrix(iris), as.matrix(newdf)) # also strips attribute
##' @export
fromDataFrame <- function(
obj,
uri,
col_index = NULL,
sparse = TRUE,
obj,
uri,
col_index = NULL,
sparse = TRUE,
allows_dups = sparse,
cell_order = "COL_MAJOR",
tile_order = "COL_MAJOR",
filter = "ZSTD",
capacity = 10000L,
tile_domain = NULL,
capacity = 10000L,
tile_domain = NULL,
tile_extent = NULL,
mode = c("ingest", "schema_only", "append"),
filter_list = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/Filestore.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ tiledb_filestore_buffer_import <- function(filestore_uri, buf, bytes, ctx = tile
##' Export from a TileDB Filestore to a character variable
##'
##' @param filestore_uri Character with an TileDB Array Schema URI
##' @param offset (optional) Numeric variable with offset from beginnig, default is zero
##' @param offset (optional) Numeric variable with offset from beginning, default is zero
##' @param bytes (optional) Numeric variable with number of bytes to read, default is zero
##' @param ctx (optional) A TileDB Ctx object; if not supplied the default
##' context object is retrieved
Expand Down
2 changes: 1 addition & 1 deletion R/Metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
##' @param arr A TileDB Array object
##' @param key A character value describing a metadata key
##' @return A logical value indicating if the given key exists in the
##' metdata of the given array
##' metadata of the given array
##' @export
tiledb_has_metadata <- function(arr, key) {
stopifnot(
Expand Down
2 changes: 1 addition & 1 deletion R/NDRectangle.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ setClass("tiledb_ndrectangle",
tiledb_ndrectangle <- function(dom, ctx = tiledb_get_context()) {
stopifnot(
"The first argument must be a TileDB Domain object" = is(dom, "tiledb_domain"),
"The second argment must be a TileDB Ctx object" = is(ctx, "tiledb_ctx"),
"The second argument must be a TileDB Ctx object" = is(ctx, "tiledb_ctx"),
"This function needs TileDB 2.25.0 or later" = tiledb_version(TRUE) >= "2.25.0"
)
ptr <- libtiledb_ndrectangle_create(ctx@ptr, dom@ptr)
Expand Down
6 changes: 3 additions & 3 deletions R/Profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ tiledb_profile_dir <- function(profile) {
#' @export
tiledb_profile_set_param <- function(profile, param, value) {
stopifnot(`The 'profile' argument must be a tiledb_profile object` = is(profile, "tiledb_profile"))
stopifnot(`The 'param' arugment must have character type` = is.character(param))
stopifnot(`The 'value' arugment must have character type` = is.character(value))
stopifnot(`The 'param' argument must have character type` = is.character(param))
stopifnot(`The 'value' argument must have character type` = is.character(value))
libtiledb_profile_set_param(profile@ptr, param, value)
return(invisible(NULL))
}
Expand All @@ -106,7 +106,7 @@ tiledb_profile_set_param <- function(profile, param, value) {
#' @export
tiledb_profile_get_param <- function(profile, param) {
stopifnot(`The 'profile' argument must be a tiledb_profile object` = is(profile, "tiledb_profile"))
stopifnot(`The 'param' arugment must have character type` = is.character(param))
stopifnot(`The 'param' argument must have character type` = is.character(param))
value <- libtiledb_profile_get_param(profile@ptr, param)
return(value)
}
Expand Down
44 changes: 22 additions & 22 deletions R/Query.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tiledb_query_type <- function(query) {
#' @return The modified query object, invisibly
#' @export
tiledb_query_set_layout <- function(
query,
query,
layout = c(
"COL_MAJOR", "ROW_MAJOR",
"GLOBAL_ORDER", "UNORDERED"
Expand Down Expand Up @@ -165,8 +165,8 @@ tiledb_query_create_buffer_ptr_char <- function(query, varvec) {
#' @return An external pointer to the allocated buffer object
#' @export
tiledb_query_alloc_buffer_ptr_char <- function(
sizeoffsets,
sizedata,
sizeoffsets,
sizedata,
nullable = FALSE
) {
stopifnot(
Expand Down Expand Up @@ -221,15 +221,15 @@ tiledb_query_set_buffer_ptr_char <- function(query, attr, bufptr) {
#' @param ncells A number of elements (not bytes)
#' @param nullable Optional boolean parameter indicating whether missing values
#' are allowed (for which another column is allocated), default is FALSE
#' @param varnum Option intgeter parameter for the number of elemements per variable,
#' @param varnum Option integer parameter for the number of elements per variable,
#' default is one
#' @return An external pointer to the allocated buffer object
#' @export
tiledb_query_buffer_alloc_ptr <- function(
query,
datatype,
ncells,
nullable = FALSE,
query,
datatype,
ncells,
nullable = FALSE,
varnum = 1
) {
stopifnot(
Expand Down Expand Up @@ -303,7 +303,7 @@ tiledb_query_get_buffer_ptr <- function(bufptr) {
#' @return An R object as resulting from the query
#' @export
tiledb_query_get_buffer_char <- function(
bufptr,
bufptr,
sizeoffsets = 0,
sizestring = 0
) {
Expand Down Expand Up @@ -410,8 +410,8 @@ tiledb_query_result_buffer_elements <- function(query, attr) {
#' @seealso tiledb_query_result_buffer_elements
#' @export
tiledb_query_result_buffer_elements_vec <- function(
query,
attr,
query,
attr,
nullable = FALSE
) {
stopifnot(
Expand All @@ -433,10 +433,10 @@ tiledb_query_result_buffer_elements_vec <- function(
#' @return The query object, invisibly
#' @export
tiledb_query_add_range <- function(
query,
schema,
attr, lowval,
highval,
query,
schema,
attr, lowval,
highval,
stride = NULL
) {
stopifnot(
Expand Down Expand Up @@ -465,11 +465,11 @@ tiledb_query_add_range <- function(
#' @return The query object, invisibly
#' @export
tiledb_query_add_range_with_type <- function(
query,
idx,
datatype,
lowval,
highval,
query,
idx,
datatype,
lowval,
highval,
stride = NULL
) {
stopifnot(
Expand Down Expand Up @@ -517,7 +517,7 @@ tiledb_query_get_fragment_uri <- function(query, idx) {
#' Retrieve the timestamp range for a given Query Fragment
#'
#' This function is only applicable to \sQuote{WRITE} queries. The time resolution in
#' TileDB is millseconds since the epoch so an R \code{Datetime} vector is returned.
#' TileDB is milliseconds since the epoch so an R \code{Datetime} vector is returned.
#' @param query A TileDB Query object
#' @param idx An integer (or numeric) index ranging from zero to the number of fragments minus 1
#' @return A two-element datetime vector with the start and end time of the fragment write.
Expand Down Expand Up @@ -686,7 +686,7 @@ tiledb_query_ctx <- function(query) {
##' @return The value of the aggregation
##' @export
tiledb_query_apply_aggregate <- function(
query,
query,
attrname,
operation = c("Count", "NullCount", "Min", "Max", "Mean", "Sum"),
nullable = TRUE
Expand Down
2 changes: 1 addition & 1 deletion R/QueryCondition.R
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ parse_query_condition <- function(expr, ta = NULL, debug = FALSE, strict = TRUE,
#' @param use_enum A boolean to set (if TRUE) or unset (if FALSE) enumeration use
#' @param ctx (optional) A TileDB Ctx object; if not supplied the default
#' context object is retrieved
#' @return Nothing is retuned, the function is invoked for the side effect
#' @return Nothing is returned, the function is invoked for the side effect
#' @export
tiledb_query_condition_set_use_enumeration <- function(qc, use_enum, ctx = tiledb_get_context()) {
stopifnot(
Expand Down
16 changes: 8 additions & 8 deletions R/TileDBArray.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#' conversion, permitted values are \sQuote{asis} (default, returning a list
#' of columns), \sQuote{array}, \sQuote{matrix},\sQuote{data.frame},
#' \sQuote{data.table} \sQuote{tibble}, \sQuote{arrow_table} or \sQuote{arrow}
#' (where the last two are synomyms); note that \sQuote{data.table},
#' (where the last two are synonyms); note that \sQuote{data.table},
#' \sQuote{tibble} and \sQuote{arrow} require the respective packages
#' to be installed.
#' @slot query_statistics A logical value, defaults to \sQuote{FALSE}; if
Expand Down Expand Up @@ -125,10 +125,10 @@ setClass(
#' default uninitialized without a condition; this functionality requires
#' TileDB 2.3.0 or later
#' @param timestamp_start optional A POSIXct Datetime value determining the
#' inclusive time point at which the array is to be openened. No fragments
#' inclusive time point at which the array is to be opened. No fragments
#' written earlier will be considered.
#' @param timestamp_end optional A POSIXct Datetime value determining the
#' inclusive time point until which the array is to be openened. No fragments
#' inclusive time point until which the array is to be opened. No fragments
#' written earlier later be considered.
#' @param return_as optional A character value with the desired
#' \code{tiledb_array} conversion, permitted values are \sQuote{asis} (default,
Expand Down Expand Up @@ -500,7 +500,7 @@ setValidity("tiledb_array", function(object) {

#' Returns a TileDB array, allowing for specific subset ranges.
#'
#' Heterogenous domains are supported, including timestamps and characters.
#' Heterogeneous domains are supported, including timestamps and characters.
#'
#' This function may still still change; the current implementation should be
#' considered as an initial draft.
Expand Down Expand Up @@ -1429,10 +1429,10 @@ setMethod(
}
} else {
if (length(tstamp) > 0) {
spdl::debug("['[<-'] openning for WRITE at {}", tstamp)
spdl::debug("['[<-'] opening for WRITE at {}", tstamp)
arrptr <- libtiledb_array_open_at(ctx@ptr, uri, "WRITE", tstamp)
} else {
spdl::debug("['[<-'] openning for WRITE")
spdl::debug("['[<-'] opening for WRITE")
arrptr <- libtiledb_array_open(ctx@ptr, uri, "WRITE")
}
}
Expand Down Expand Up @@ -1818,7 +1818,7 @@ setMethod("query_layout", signature = "tiledb_array", function(object) object@qu
#'
#' @param value A character variable for the query layout. Permitted values
#' are \dQuote{ROW_MAJOR}, \dQuote{COL_MAJOR}, \dQuote{GLOBAL_ORDER}, or
#' \dQuote{UNORDERD}.
#' \dQuote{UNORDERED}.
#' @return The modified \code{tiledb_array} array object
#' @export
setReplaceMethod(
Expand Down Expand Up @@ -2359,7 +2359,7 @@ setGeneric("tdb_filter", function(x, ...) standardGeneric("tdb_filter"))
#'
#' @param x A tiledb_array object as first argument, permitting piping
#' @param ... One or more expressions that are parsed as query_condition objects
#' @param strict A boolean toogle to, if set, errors if a non-existing attribute
#' @param strict A boolean toggle to, if set, errors if a non-existing attribute
#' is selected or filtered on, defaults to 'TRUE'; if 'FALSE' a warning is shown
#' by execution proceeds.
#' @return The tiledb_array object, permitting piping
Expand Down
Loading
Loading