Learn R Programming

scidb (version 1.2-0)

sort-methods: Methods for Function sort in Package scidb

Description

Aggregate a SciDB array object grouped by a subset of its dimensions and/or attributes.

Usage

"sort"(x, decreasing = FALSE, ...) "sort"(x, decreasing = FALSE, ...)

Arguments

x
A scidb or scidbdf object.
decreasing
A logical value: TRUE means sort in decreasing order.
...
Optional SciDB-specific aruments (see details below).

Value

scidb or scidbdf reference object.

Details

Create a new array reference object that represents the sorted version of array x. The output array reference has the same shape and number of attributes as x but the specified attributes appear in sorted order. The following SciDB-specific parameters are available:
  • attributes(Required) A character vector of attribute names from array x to sort on
  • eval(Optional) If true, execute the query and store the result array. Otherwise defer evaluation.

Examples

Run this code
## Not run: 
# # Create a copy of the iris data frame in a 1-d SciDB array named "iris."
# # Note that SciDB attribute names will be changed to conform to SciDB
# # naming convention.
# x <- as.scidb(iris,name="iris")
# 
# # Sort x by Petal_Width and Petal_Length:
# a <- sort(x, attributes=c("Petal_Width","Petal_Length"))
# ## End(Not run)

Run the code above in your browser using DataLab