Skip to content

Commit 9f26ac6

Browse files
committed
Disambiguate with aliases instead
1 parent 421b9ed commit 9f26ac6

4 files changed

Lines changed: 50 additions & 50 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
S3method(print,h5summary)
44
export("%>%")
5+
export(ModelArray)
56
export(ModelArray.gam)
67
export(ModelArray.lm)
78
export(ModelArray.wrap)
@@ -15,7 +16,6 @@ export(gen_gamFormula_contIx)
1516
export(gen_gamFormula_fxSmooth)
1617
export(h5summary)
1718
export(mergeModelArrays)
18-
export(modelarray)
1919
export(nElements)
2020
export(nInputFiles)
2121
export(numElementsTotal)

R/ModelArray_Constructor.R

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#' \code{\link{scalars}}, \code{\link{sources}}, \code{\link{results}} for
3737
#' accessors.
3838
#'
39+
#' @aliases ModelArray-class
40+
#' @rdname ModelArray-class
3941
#' @importClassesFrom DelayedArray DelayedArray
4042
#' @exportClass ModelArray
4143
ModelArray <- setClass(
@@ -70,54 +72,53 @@ ModelArraySeed <- function(filepath, name, type = NA) {
7072

7173

7274

73-
#' Load element-wise data from an HDF5 file as a ModelArray object
75+
#' Load element-wise data from an HDF5 file
7476
#'
7577
#' @description
76-
#' Reads scalar matrices and (optionally) saved analysis results from an HDF5
77-
#' file and returns a \linkS4class{ModelArray} object.
78+
#' Reads scalar matrices and (optionally) saved analysis results from
79+
#' an HDF5 file and returns a \linkS4class{ModelArray} object.
7880
#'
7981
#' @details
8082
#' The constructor reads each scalar listed in \code{scalar_types} from
81-
#' \code{/scalars/<scalar_type>/values} in the HDF5 file, wrapping them as
82-
#' \linkS4class{DelayedArray} objects for lazy access. Source filenames are
83-
#' extracted from HDF5 attributes or companion datasets.
83+
#' \code{/scalars/<scalar_type>/values}, wrapping them as
84+
#' \linkS4class{DelayedArray} objects. Source filenames are extracted
85+
#' from HDF5 attributes or companion datasets.
8486
#'
85-
#' If \code{analysis_names} is non-empty, saved results are read from
86-
#' \code{/results/<name>/results_matrix} along with column name metadata.
87+
#' If \code{analysis_names} is non-empty, saved results are loaded from
88+
#' \code{/results/<name>/results_matrix}.
8789
#'
8890
#' \strong{Debugging tip:} If you encounter
89-
#' \code{"Error in h(simpleError(msg, call)) : error in evaluating the
90-
#' argument 'seed'..."}, check that \code{scalar_types} matches the groups
91-
#' present in the file. Inspect with \code{rhdf5::h5ls(filepath)}.
91+
#' \code{"error in evaluating the argument 'seed'..."}, check that
92+
#' \code{scalar_types} matches groups in the file. Inspect with
93+
#' \code{rhdf5::h5ls(filepath)}.
9294
#'
93-
#' @param filepath Character. Path to an existing HDF5 (\code{.h5}) file
94-
#' containing element-wise scalar data.
95-
#' @param scalar_types Character vector. Names of scalar groups to read from
96-
#' \code{/scalars/} in the HDF5 file. Default is \code{c("FD")}. Must match
97-
#' group names in the file; verify with \code{rhdf5::h5ls(filepath)}.
95+
#' @param filepath Character. Path to an existing HDF5 (\code{.h5})
96+
#' file containing element-wise scalar data.
97+
#' @param scalar_types Character vector. Names of scalar groups to read
98+
#' from \code{/scalars/} in the HDF5 file. Default is \code{c("FD")}.
99+
#' Must match group names in the file.
98100
#' @param analysis_names Character vector. Subfolder names under
99-
#' \code{/results/} to load. Default is \code{character(0)} (no results
100-
#' loaded).
101+
#' \code{/results/} to load. Default is \code{character(0)} (none).
101102
#'
102103
#' @return A \linkS4class{ModelArray} object.
103104
#'
104105
#' @seealso \linkS4class{ModelArray} for the class definition,
105-
#' \code{\link{h5summary}} for inspecting an HDF5 file without loading,
106-
#' \code{\link{scalars}}, \code{\link{sources}} for accessing loaded data.
106+
#' \code{\link{h5summary}} for inspecting an HDF5 file.
107107
#'
108108
#' @examples
109109
#' \dontrun{
110110
#' ma <- ModelArray("path/to/data.h5", scalar_types = c("FD", "FC"))
111111
#' ma
112-
#' scalars(ma)
113112
#' }
114113
#'
114+
#' @rdname ModelArray
115+
#' @aliases ModelArray
115116
#' @export
116117
#' @import methods
117118
#' @importFrom dplyr %>%
118119
#' @importFrom DelayedArray DelayedArray realize
119120
#' @importFrom rhdf5 h5readAttributes
120-
modelarray <- function(filepath,
121+
ModelArray <- function(filepath,
121122
scalar_types = c("FD"),
122123
analysis_names = character(0)) {
123124
# TODO: try and use hdf5r instead of rhdf5 and delayedarray here

man/ModelArray-class.Rd

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ModelArray.Rd

Lines changed: 21 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)