Browse code

Fix incorrectly documented arguments in a few functions

Henrik Bengtsson authored on 04/02/2024 21:17:29
Showing 1 changed files
... ...
@@ -1,64 +1,64 @@
1
-########################################################################/**
2
-# @RdocFunction cdfSetDimension
3
-#
4
-# @title "Sets the dimension of an object"
5
-#
6
-# \description{
7
-#  @get "title".
8
-#
9
-#  This @function is designed to be used with @see "applyCdfGroupFields".
10
-# }
11
-#
12
-# @synopsis
13
-#
14
-# \arguments{
15
-#  \item{groups}{A @list of groups.}
16
-#  \item{which}{An @integer or @character @vector of groups be returned.}
17
-#  \item{...}{Not used.}
18
-# }
19
-#
20
-# \value{
21
-#  Returns a @list structure of groups.
22
-# }
23
-#
24
-# \seealso{
25
-#  @see "applyCdfGroupFields".
26
-# }
27
-#
28
-# @author "HB"
29
-#
30
-# @keyword programming
31
-# @keyword internal
32
-#**/#######################################################################
33
-cdfSetDimension <- function(field, dim, ...) {
34
-  n <- length(field);
35
-  ndim <- length(dim);
36
-
37
-  naDim <- which(is.na(dim));
38
-  if (length(naDim) > 0) {
39
-    if (length(naDim) > 1) {
40
-      stop("Cannot infer dimension. Only one of the dimension can be unknown: ", paste(dim, collapse="x"));
41
-    }
42
-    dimNA <- n / prod(dim[-naDim]);
43
-    if (dimNA %% 1 == 0) {
44
-      dim[naDim] <- dimNA;
45
-      dim(field) <- dim;
46
-    }
47
-  } else if (n == prod(dim)) {
48
-    dim(field) <- dim;
49
-  }
50
-
51
-  field;
52
-} # cdfSetDimension()
53
-
54
-
55
-############################################################################
56
-# HISTORY:
57
-# 2013-09-23
58
-# o SPEEDUP/CLEANUP: Package now uses which() instead of whichVector()
59
-#   of 'R.utils'.  Before R (< 2.11.0), which() used to be 10x slower
60
-#   than whichVector(), but now it's 3x faster.
61
-# 2009-05-29
62
-# o Added Rdoc comments.
63
-# o Created.
64
-############################################################################
1
+########################################################################/**
2
+# @RdocFunction cdfSetDimension
3
+#
4
+# @title "Sets the dimension of an object"
5
+#
6
+# \description{
7
+#  @get "title".
8
+#
9
+#  This @function is designed to be used with @see "applyCdfGroupFields".
10
+# }
11
+#
12
+# @synopsis
13
+#
14
+# \arguments{
15
+#  \item{field}{An R object.}
16
+#  \item{dim}{An @integer vector.}
17
+#  \item{...}{Not used.}
18
+# }
19
+#
20
+# \value{
21
+#  Returns a @list structure of groups.
22
+# }
23
+#
24
+# \seealso{
25
+#  @see "applyCdfGroupFields".
26
+# }
27
+#
28
+# @author "HB"
29
+#
30
+# @keyword programming
31
+# @keyword internal
32
+#**/#######################################################################
33
+cdfSetDimension <- function(field, dim, ...) {
34
+  n <- length(field);
35
+  ndim <- length(dim);
36
+
37
+  naDim <- which(is.na(dim));
38
+  if (length(naDim) > 0) {
39
+    if (length(naDim) > 1) {
40
+      stop("Cannot infer dimension. Only one of the dimension can be unknown: ", paste(dim, collapse="x"));
41
+    }
42
+    dimNA <- n / prod(dim[-naDim]);
43
+    if (dimNA %% 1 == 0) {
44
+      dim[naDim] <- dimNA;
45
+      dim(field) <- dim;
46
+    }
47
+  } else if (n == prod(dim)) {
48
+    dim(field) <- dim;
49
+  }
50
+
51
+  field;
52
+} # cdfSetDimension()
53
+
54
+
55
+############################################################################
56
+# HISTORY:
57
+# 2013-09-23
58
+# o SPEEDUP/CLEANUP: Package now uses which() instead of whichVector()
59
+#   of 'R.utils'.  Before R (< 2.11.0), which() used to be 10x slower
60
+#   than whichVector(), but now it's 3x faster.
61
+# 2009-05-29
62
+# o Added Rdoc comments.
63
+# o Created.
64
+############################################################################
Browse code

Version: 1.33.4 [2013-09-23] o SPEEDUP/CLEANUP: Package now uses which() instead of whichVector() of 'R.utils'. Before R (< 2.11.0), which() used to be 10x slower than whichVector(), but now it's 3x faster.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/affxparser@80674 bc3139a8-67e5-0310-9ffc-ced21a209358

H Bengtsson authored on 23/09/2013 19:38:07
Showing 1 changed files
... ...
@@ -29,12 +29,12 @@
29 29
 #
30 30
 # @keyword programming
31 31
 # @keyword internal
32
-#**/####################################################################### 
32
+#**/#######################################################################
33 33
 cdfSetDimension <- function(field, dim, ...) {
34 34
   n <- length(field);
35 35
   ndim <- length(dim);
36 36
 
37
-  naDim <- whichVector(is.na(dim));
37
+  naDim <- which(is.na(dim));
38 38
   if (length(naDim) > 0) {
39 39
     if (length(naDim) > 1) {
40 40
       stop("Cannot infer dimension. Only one of the dimension can be unknown: ", paste(dim, collapse="x"));
... ...
@@ -54,6 +54,10 @@ cdfSetDimension <- function(field, dim, ...) {
54 54
 
55 55
 ############################################################################
56 56
 # HISTORY:
57
+# 2013-09-23
58
+# o SPEEDUP/CLEANUP: Package now uses which() instead of whichVector()
59
+#   of 'R.utils'.  Before R (< 2.11.0), which() used to be 10x slower
60
+#   than whichVector(), but now it's 3x faster.
57 61
 # 2009-05-29
58 62
 # o Added Rdoc comments.
59 63
 # o Created.
Browse code

o Added an Authors@R field to DESCRIPTION. o Recompiled the Rdoc-to-Rd help files using R 1.13.0, i.e. R.oo::compileRdoc().

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/affxparser@74592 bc3139a8-67e5-0310-9ffc-ced21a209358

H Bengtsson authored on 20/03/2013 03:34:49
Showing 1 changed files
... ...
@@ -25,7 +25,7 @@
25 25
 #  @see "applyCdfGroupFields".
26 26
 # }
27 27
 #
28
-# @author
28
+# @author "HB"
29 29
 #
30 30
 # @keyword programming
31 31
 # @keyword internal
Browse code

Version: 1.17.3 [2009-05-29] o Added applyCdfGroupFields() and cdfSetDimension().

Version: 1.17.2 [2009-02-20]
o BUG FIX: readChp() would crash (segmentation fault) for (at least)
some CHP files for GenomeWideSNP_5 generated by Affymetrix Power Tools.
o BUG FIX: Updated compareCels() to work with new readCelHeader().

Version: 1.17.1 [2009-05-09]
o Now readCelHeader() also reads DAT headers from Calvin CEL files.

Version: 1.17.0 [2009-04-20]
o Devel version bumped because of the new Bioconductor release.

Version: 1.16.0 [2009-04-20]
o Release version bumped because of the new Bioconductor release.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/affxparser@39806 bc3139a8-67e5-0310-9ffc-ced21a209358

Henrik Bengtsson authored on 30/05/2009 04:40:14
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+########################################################################/**
2
+# @RdocFunction cdfSetDimension
3
+#
4
+# @title "Sets the dimension of an object"
5
+#
6
+# \description{
7
+#  @get "title".
8
+#
9
+#  This @function is designed to be used with @see "applyCdfGroupFields".
10
+# }
11
+#
12
+# @synopsis
13
+#
14
+# \arguments{
15
+#  \item{groups}{A @list of groups.}
16
+#  \item{which}{An @integer or @character @vector of groups be returned.}
17
+#  \item{...}{Not used.}
18
+# }
19
+#
20
+# \value{
21
+#  Returns a @list structure of groups.
22
+# }
23
+#
24
+# \seealso{
25
+#  @see "applyCdfGroupFields".
26
+# }
27
+#
28
+# @author
29
+#
30
+# @keyword programming
31
+# @keyword internal
32
+#**/####################################################################### 
33
+cdfSetDimension <- function(field, dim, ...) {
34
+  n <- length(field);
35
+  ndim <- length(dim);
36
+
37
+  naDim <- whichVector(is.na(dim));
38
+  if (length(naDim) > 0) {
39
+    if (length(naDim) > 1) {
40
+      stop("Cannot infer dimension. Only one of the dimension can be unknown: ", paste(dim, collapse="x"));
41
+    }
42
+    dimNA <- n / prod(dim[-naDim]);
43
+    if (dimNA %% 1 == 0) {
44
+      dim[naDim] <- dimNA;
45
+      dim(field) <- dim;
46
+    }
47
+  } else if (n == prod(dim)) {
48
+    dim(field) <- dim;
49
+  }
50
+
51
+  field;
52
+} # cdfSetDimension()
53
+
54
+
55
+############################################################################
56
+# HISTORY:
57
+# 2009-05-29
58
+# o Added Rdoc comments.
59
+# o Created.
60
+############################################################################