|
66 | 66 | #' str(mydat) |
67 | 67 | #' str(mydat[id1 %in% c(2, 3), ]) |
68 | 68 | #' str(myhmatrix[id1 %in% c(2, 3), ]) |
| 69 | +#' |
| 70 | +#' @return An matrix object of type \code{"hmatrix"} |
69 | 71 | #' |
70 | 72 | #' @export |
71 | 73 | hmatrix <- function(time, id, x, argvals=1:ncol(x), |
@@ -120,7 +122,7 @@ hmatrix <- function(time, id, x, argvals=1:ncol(x), |
120 | 122 | #' @seealso \code{\link{hmatrix}} for the h.atrix class. |
121 | 123 | #' |
122 | 124 | #' @aliases getId getX getArgvals getTimeLab getIdLab getXLab getArgvalsLab |
123 | | -#' |
| 125 | +#' @return properties of a hmatrix or fmatrix |
124 | 126 | #' @export |
125 | 127 | getTime <- function(object) { UseMethod("getTime", object) } |
126 | 128 |
|
@@ -165,6 +167,7 @@ getArgvalsLab <- function(object) { UseMethod("getArgvalsLab", object) } |
165 | 167 | #' \code{getIdLab}, \code{getXLab}, \code{getArgvalsLab} for an object of class \code{hmatrix}. |
166 | 168 | #' |
167 | 169 | #' @aliases getId.hmatrix getX.hmatrix getArgvals.hmatrix getTimeLab.hmatrix getXLab.hmatrix getArgvalsLab.hmatrix |
| 170 | +#' @return properties of a hmatrix |
168 | 171 | #' |
169 | 172 | #' @export |
170 | 173 | getTime.hmatrix <- function(object) object[ , 1, drop=TRUE] |
@@ -203,7 +206,7 @@ getArgvalsLab.hmatrix <- function(object) attr(object, "argvalsLab") |
203 | 206 | #' |
204 | 207 | #' is.hmatrix tests if its argument is an object of class hmatrix. |
205 | 208 | #' @param object object of class hmatrix |
206 | | -#' |
| 209 | +#' @return logical value |
207 | 210 | #' @export |
208 | 211 | is.hmatrix <- function(object){ |
209 | 212 | inherits(object, "hmatrix") |
@@ -231,7 +234,7 @@ is.hmatrix <- function(object){ |
231 | 234 | #' From the functional covariate \code{x} rows are selected accordingly. |
232 | 235 | #' |
233 | 236 | #' @seealso ?"[" |
234 | | -#' |
| 237 | +#' @return a \code{"hmatrix"} object |
235 | 238 | #' @export |
236 | 239 | `[.hmatrix` <- function(x, i, j, ..., drop=FALSE) { |
237 | 240 |
|
@@ -272,7 +275,7 @@ is.hmatrix <- function(object){ |
272 | 275 | #' repeated accordingly so that two vectors of the same length are returned. |
273 | 276 | #' @param time the observation points |
274 | 277 | #' @param id the id for the curve |
275 | | -#' |
| 278 | +#' @return a list with \code{time} and \code{id} |
276 | 279 | #' @export |
277 | 280 | wide2long <- function(time, id){ |
278 | 281 | newtime <- rep(time, each=length(unique(id))) |
@@ -303,6 +306,8 @@ wide2long <- function(time, id){ |
303 | 306 | #' try(resMat2 <- subset_hmatrix(resMat, index = index2)) |
304 | 307 | #' resMat <- subset_hmatrix(hmat, index = index1, compress = FALSE) |
305 | 308 | #' try(resMat2 <- subset_hmatrix(resMat, index = index2)) |
| 309 | +#' |
| 310 | +#' @return a \code{hmatrix} object |
306 | 311 | #' |
307 | 312 | #' @export |
308 | 313 | subset_hmatrix <- function(x, index, compress = TRUE) |
|
0 commit comments