* colVars
* colSds
* colLogSumExps
* colProds
* colWeightedMeans
* colWeigthedVars
* colWeightedSds
* colCounts
* colAnyNAs
* colAnys
* colAlls
* colCollapse
* colQuantiles
* colTabulates
* colIQRs
* colCumsums
* colCumprods
* colAvgsPerRowSet
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,57 +0,0 @@ |
1 |
-% Generated by roxygen2: do not edit by hand |
|
2 |
-% Please edit documentation in R/methods.R, R/methods_row.R |
|
3 |
-\name{colCollapse,dgCMatrix-method} |
|
4 |
-\alias{colCollapse,dgCMatrix-method} |
|
5 |
-\alias{rowCollapse,dgCMatrix-method} |
|
6 |
-\title{Extract one cell from each row (column) of a matrix-like object} |
|
7 |
-\usage{ |
|
8 |
-\S4method{colCollapse}{dgCMatrix}(x, idxs, cols = NULL) |
|
9 |
- |
|
10 |
-\S4method{rowCollapse}{dgCMatrix}(x, idxs, rows = NULL) |
|
11 |
-} |
|
12 |
-\arguments{ |
|
13 |
-\item{x}{An NxK matrix-like object.} |
|
14 |
- |
|
15 |
-\item{idxs}{An index \code{\link{vector}} with the position to extract. |
|
16 |
-It is recycled to match the number of rows (column)} |
|
17 |
- |
|
18 |
-\item{cols}{A \code{\link{vector}} indicating the subset of rows |
|
19 |
-(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is |
|
20 |
-done.} |
|
21 |
- |
|
22 |
-\item{rows}{A \code{\link{vector}} indicating the subset of rows |
|
23 |
-(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is |
|
24 |
-done.} |
|
25 |
-} |
|
26 |
-\value{ |
|
27 |
-Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). |
|
28 |
-} |
|
29 |
-\description{ |
|
30 |
-Extract one cell from each row (column) of a matrix-like object. |
|
31 |
-} |
|
32 |
-\details{ |
|
33 |
-The S4 methods for \code{x} of type \code{\link{matrix}}, |
|
34 |
-\code{\link{array}}, or \code{\link{numeric}} call |
|
35 |
-\code{matrixStats::\link[matrixStats]{rowCollapse}} |
|
36 |
-/ \code{matrixStats::\link[matrixStats:rowCollapse]{colCollapse}}. |
|
37 |
-} |
|
38 |
-\examples{ |
|
39 |
-mat <- matrix(rnorm(15), nrow = 5, ncol = 3) |
|
40 |
- mat[2, 1] <- NA |
|
41 |
- mat[3, 3] <- Inf |
|
42 |
- mat[4, 1] <- 0 |
|
43 |
- |
|
44 |
- print(mat) |
|
45 |
- |
|
46 |
- rowCollapse(mat, idxs = 2) |
|
47 |
- rowCollapse(mat, idxs = c(1,1,2,3,2)) |
|
48 |
- |
|
49 |
- colCollapse (mat, idxs = 4) |
|
50 |
-} |
|
51 |
-\seealso{ |
|
52 |
-\itemize{ |
|
53 |
-\item \code{matrixStats::\link[matrixStats]{rowCollapse}()} and |
|
54 |
-\code{matrixStats::\link[matrixStats:rowCollapse]{colCollapse}()} |
|
55 |
-which are used when the input is a \code{matrix} or \code{numeric} vector. |
|
56 |
-} |
|
57 |
-} |
See https://github.com/Bioconductor/MatrixGenerics/issues/11
for more information
... | ... |
@@ -12,29 +12,28 @@ |
12 | 12 |
\arguments{ |
13 | 13 |
\item{x}{An NxK matrix-like object.} |
14 | 14 |
|
15 |
-\item{idxs}{An index \code{\link[base]{vector}} with the position to extract. |
|
15 |
+\item{idxs}{An index \code{\link{vector}} with the position to extract. |
|
16 | 16 |
It is recycled to match the number of rows (column)} |
17 | 17 |
|
18 |
-\item{cols}{A \code{\link[base]{vector}} indicating the subset of rows |
|
19 |
-(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
|
20 |
-subsetting is done.} |
|
18 |
+\item{cols}{A \code{\link{vector}} indicating the subset of rows |
|
19 |
+(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is |
|
20 |
+done.} |
|
21 | 21 |
|
22 |
-\item{rows}{A \code{\link[base]{vector}} indicating the subset of rows |
|
23 |
-(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
|
24 |
-subsetting is done.} |
|
22 |
+\item{rows}{A \code{\link{vector}} indicating the subset of rows |
|
23 |
+(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is |
|
24 |
+done.} |
|
25 | 25 |
} |
26 | 26 |
\value{ |
27 |
-Returns a \code{\link[base]{numeric}} \code{\link[base]{vector}} of |
|
28 |
-length N (K). |
|
27 |
+Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). |
|
29 | 28 |
} |
30 | 29 |
\description{ |
31 | 30 |
Extract one cell from each row (column) of a matrix-like object. |
32 | 31 |
} |
33 | 32 |
\details{ |
34 |
-The S4 methods for \code{x} of type \code{\link[base]{matrix}}, |
|
35 |
-\code{\link[base]{array}}, or \code{\link[base]{numeric}} call |
|
33 |
+The S4 methods for \code{x} of type \code{\link{matrix}}, |
|
34 |
+\code{\link{array}}, or \code{\link{numeric}} call |
|
36 | 35 |
\code{matrixStats::\link[matrixStats]{rowCollapse}} |
37 |
-/ \code{matrixStats::\link[matrixStats]{colCollapse}}. |
|
36 |
+/ \code{matrixStats::\link[matrixStats:rowCollapse]{colCollapse}}. |
|
38 | 37 |
} |
39 | 38 |
\examples{ |
40 | 39 |
mat <- matrix(rnorm(15), nrow = 5, ncol = 3) |
... | ... |
@@ -52,7 +51,7 @@ mat <- matrix(rnorm(15), nrow = 5, ncol = 3) |
52 | 51 |
\seealso{ |
53 | 52 |
\itemize{ |
54 | 53 |
\item \code{matrixStats::\link[matrixStats]{rowCollapse}()} and |
55 |
-\code{matrixStats::\link[matrixStats]{colCollapse}()} which are used when |
|
56 |
-the input is a \code{matrix} or \code{numeric} vector. |
|
54 |
+\code{matrixStats::\link[matrixStats:rowCollapse]{colCollapse}()} |
|
55 |
+which are used when the input is a \code{matrix} or \code{numeric} vector. |
|
57 | 56 |
} |
58 | 57 |
} |
... | ... |
@@ -5,9 +5,9 @@ |
5 | 5 |
\alias{rowCollapse,dgCMatrix-method} |
6 | 6 |
\title{Extract one cell from each row (column) of a matrix-like object} |
7 | 7 |
\usage{ |
8 |
-\S4method{colCollapse}{dgCMatrix}(x, idxs = idxs, cols = NULL, ...) |
|
8 |
+\S4method{colCollapse}{dgCMatrix}(x, idxs, cols = NULL) |
|
9 | 9 |
|
10 |
-\S4method{rowCollapse}{dgCMatrix}(x, idxs, rows = NULL, ...) |
|
10 |
+\S4method{rowCollapse}{dgCMatrix}(x, idxs, rows = NULL) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{x}{An NxK matrix-like object.} |
... | ... |
@@ -19,8 +19,6 @@ It is recycled to match the number of rows (column)} |
19 | 19 |
(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
20 | 20 |
subsetting is done.} |
21 | 21 |
|
22 |
-\item{...}{Additional arguments passed to specific methods.} |
|
23 |
- |
|
24 | 22 |
\item{rows}{A \code{\link[base]{vector}} indicating the subset of rows |
25 | 23 |
(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
26 | 24 |
subsetting is done.} |
... | ... |
@@ -15,24 +15,27 @@ |
15 | 15 |
\item{idxs}{An index \code{\link[base]{vector}} with the position to extract. |
16 | 16 |
It is recycled to match the number of rows (column)} |
17 | 17 |
|
18 |
-\item{cols}{A \code{\link[base]{vector}} indicating the subset (and/or |
|
19 |
-columns) to operate over. If \code{\link[base]{NULL}}, no subsetting is done.} |
|
18 |
+\item{cols}{A \code{\link[base]{vector}} indicating the subset of rows |
|
19 |
+(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
|
20 |
+subsetting is done.} |
|
20 | 21 |
|
21 | 22 |
\item{...}{Additional arguments passed to specific methods.} |
22 | 23 |
|
23 |
-\item{rows}{A \code{\link[base]{vector}} indicating the subset (and/or |
|
24 |
-columns) to operate over. If \code{\link[base]{NULL}}, no subsetting is done.} |
|
24 |
+\item{rows}{A \code{\link[base]{vector}} indicating the subset of rows |
|
25 |
+(and/or columns) to operate over. If \code{\link[base]{NULL}}, no |
|
26 |
+subsetting is done.} |
|
25 | 27 |
} |
26 | 28 |
\value{ |
27 | 29 |
Returns a \code{\link[base]{numeric}} \code{\link[base]{vector}} of |
28 | 30 |
length N (K). |
29 | 31 |
} |
30 | 32 |
\description{ |
31 |
-Extract one cell from each row (column) of a matrix-like object |
|
33 |
+Extract one cell from each row (column) of a matrix-like object. |
|
32 | 34 |
} |
33 | 35 |
\details{ |
34 |
-The S4 methods for \code{x} of type \code{\link[base]{matrix}} or |
|
35 |
-\code{\link[base]{numeric}} call \code{matrixStats::\link[matrixStats]{rowCollapse}} |
|
36 |
+The S4 methods for \code{x} of type \code{\link[base]{matrix}}, |
|
37 |
+\code{\link[base]{array}}, or \code{\link[base]{numeric}} call |
|
38 |
+\code{matrixStats::\link[matrixStats]{rowCollapse}} |
|
36 | 39 |
/ \code{matrixStats::\link[matrixStats]{colCollapse}}. |
37 | 40 |
} |
38 | 41 |
\examples{ |
... | ... |
@@ -1,10 +1,13 @@ |
1 | 1 |
% Generated by roxygen2: do not edit by hand |
2 |
-% Please edit documentation in R/methods.R |
|
2 |
+% Please edit documentation in R/methods.R, R/methods_row.R |
|
3 | 3 |
\name{colCollapse,dgCMatrix-method} |
4 | 4 |
\alias{colCollapse,dgCMatrix-method} |
5 |
+\alias{rowCollapse,dgCMatrix-method} |
|
5 | 6 |
\title{Extract one cell from each row (column) of a matrix-like object} |
6 | 7 |
\usage{ |
7 | 8 |
\S4method{colCollapse}{dgCMatrix}(x, idxs = idxs, cols = NULL, ...) |
9 |
+ |
|
10 |
+\S4method{rowCollapse}{dgCMatrix}(x, idxs, rows = NULL, ...) |
|
8 | 11 |
} |
9 | 12 |
\arguments{ |
10 | 13 |
\item{x}{An NxK matrix-like object.} |
... | ... |
@@ -16,6 +19,9 @@ It is recycled to match the number of rows (column)} |
16 | 19 |
columns) to operate over. If \code{\link[base]{NULL}}, no subsetting is done.} |
17 | 20 |
|
18 | 21 |
\item{...}{Additional arguments passed to specific methods.} |
22 |
+ |
|
23 |
+\item{rows}{A \code{\link[base]{vector}} indicating the subset (and/or |
|
24 |
+columns) to operate over. If \code{\link[base]{NULL}}, no subsetting is done.} |
|
19 | 25 |
} |
20 | 26 |
\value{ |
21 | 27 |
Returns a \code{\link[base]{numeric}} \code{\link[base]{vector}} of |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,51 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/methods.R |
|
3 |
+\name{colCollapse,dgCMatrix-method} |
|
4 |
+\alias{colCollapse,dgCMatrix-method} |
|
5 |
+\title{Extract one cell from each row (column) of a matrix-like object} |
|
6 |
+\usage{ |
|
7 |
+\S4method{colCollapse}{dgCMatrix}(x, idxs = idxs, cols = NULL, ...) |
|
8 |
+} |
|
9 |
+\arguments{ |
|
10 |
+\item{x}{An NxK matrix-like object.} |
|
11 |
+ |
|
12 |
+\item{idxs}{An index \code{\link[base]{vector}} with the position to extract. |
|
13 |
+It is recycled to match the number of rows (column)} |
|
14 |
+ |
|
15 |
+\item{cols}{A \code{\link[base]{vector}} indicating the subset (and/or |
|
16 |
+columns) to operate over. If \code{\link[base]{NULL}}, no subsetting is done.} |
|
17 |
+ |
|
18 |
+\item{...}{Additional arguments passed to specific methods.} |
|
19 |
+} |
|
20 |
+\value{ |
|
21 |
+Returns a \code{\link[base]{numeric}} \code{\link[base]{vector}} of |
|
22 |
+length N (K). |
|
23 |
+} |
|
24 |
+\description{ |
|
25 |
+Extract one cell from each row (column) of a matrix-like object |
|
26 |
+} |
|
27 |
+\details{ |
|
28 |
+The S4 methods for \code{x} of type \code{\link[base]{matrix}} or |
|
29 |
+\code{\link[base]{numeric}} call \code{matrixStats::\link[matrixStats]{rowCollapse}} |
|
30 |
+/ \code{matrixStats::\link[matrixStats]{colCollapse}}. |
|
31 |
+} |
|
32 |
+\examples{ |
|
33 |
+mat <- matrix(rnorm(15), nrow = 5, ncol = 3) |
|
34 |
+ mat[2, 1] <- NA |
|
35 |
+ mat[3, 3] <- Inf |
|
36 |
+ mat[4, 1] <- 0 |
|
37 |
+ |
|
38 |
+ print(mat) |
|
39 |
+ |
|
40 |
+ rowCollapse(mat, idxs = 2) |
|
41 |
+ rowCollapse(mat, idxs = c(1,1,2,3,2)) |
|
42 |
+ |
|
43 |
+ colCollapse (mat, idxs = 4) |
|
44 |
+} |
|
45 |
+\seealso{ |
|
46 |
+\itemize{ |
|
47 |
+\item \code{matrixStats::\link[matrixStats]{rowCollapse}()} and |
|
48 |
+\code{matrixStats::\link[matrixStats]{colCollapse}()} which are used when |
|
49 |
+the input is a \code{matrix} or \code{numeric} vector. |
|
50 |
+} |
|
51 |
+} |