File: H5Sselect_index.Rd

package info (click to toggle)
r-bioc-rhdf5 2.50.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,584 kB
  • sloc: ansic: 8,521; cpp: 91; makefile: 11; python: 9; sh: 6
file content (43 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/H5S_extras.R
\name{H5Sselect_index}
\alias{H5Sselect_index}
\title{Select elements of a dataspace using R-style indexing}
\usage{
H5Sselect_index(h5space, index)
}
\arguments{
\item{h5space}{\linkS4class{H5IdComponent} object representing a dataspace.}

\item{index}{A list of integer indices. The length of the list corresponds to
the number of dimensions of the HDF5 array. If a list element is \code{NULL},
all elements of the respective dimension are selected.}
}
\description{
Combines a hyperslab selection specified by \code{start}, \code{stride}, \code{count} and
\code{block} arguments with the current selection for the dataspace represented by
\code{h5space}.
}
\details{
\code{H5Sselect_hyperslab} is similar to, but subtly different from,
\code{\link[=H5Scombine_hyperslab]{H5Scombine_hyperslab()}}.  The former modifies the selection of the
dataspace provided in the \code{h5space} argument, while the later returns a new
dataspace with the combined selection.
}
\examples{

## create a 1 dimensional dataspace
sid <- H5Screate_simple(c(10,5,3))

## Select elements that lie in in the rows 1-3, columns 2-4, 
## and the entire 3rd dimension
H5Sselect_index(sid, list(1:3, 2:4, NULL))

## We can check the number of selected points. 
## This should be 27 (3 * 3 * 3)
H5Sget_select_npoints(sid)

## always close dataspaces after usage to free resources
H5Sclose(sid)

}