Learn R Programming

scidb (version 1.1-2)

grand-methods: Miscellaneous methods from package scidb

Description

The methods described here compute a global aggregate on a SciDB array object and return a scalar value to R.

Usage

## S3 method for class 'scidb':
mean(x)
## S3 method for class 'scidb':
mean(x)
## S3 method for class 'scidb':
median(x)
## S3 method for class 'scidbdf':
median(x)
## S3 method for class 'scidbdf':
sum(x)
## S3 method for class 'scidbdf':
sum(x)
## S3 method for class 'scidb':
min(x)
## S3 method for class 'scidbdf':
min(x)
## S3 method for class 'scidb':
max(x)
## S3 method for class 'scidbdf':
max(x)
## S3 method for class 'scidb':
count(x)
## S3 method for class 'scidbdf':
count(x)
## S3 method for class 'scidb':
sd(x)
## S3 method for class 'scidbdf':
sd(x)
## S3 method for class 'scidb':
var(x)
## S3 method for class 'scidbdf':
var(x)

Arguments

x
A scidb or scidbdf object.

Value

  • The methods documented here always return a scalar value.

Details

{sum} computes the global sum of the SciDB array elements (applies only to numeric types); {mean} computes the arithmetic average of the SciDB array elements; {median} computes the median of the SciDB array elements; {min} computes the minimum of the SciDB array elements; {max} computes the maximum of the SciDB array elements; {count} returns the number of non-empty cell values in the SciDB array; {sd} computes the standard deviation of the SciDB array elements (numeric only); {var} computes the variance of the SciDB array elements (numeric only).

Examples

Run this code
data("iris")
x <- as.scidb(iris)
sum(x$Petal_Length)

Run the code above in your browser using DataLab