Permalink
Browse files

Re-roxygenise

  • Loading branch information...
1 parent 0b79b7d commit 7e9f0f792668c16481990820bbb26fb02b7a8307 @hadley committed Jul 13, 2011
Showing with 185 additions and 216 deletions.
  1. +4 −0 R/dimensions.r
  2. +1 −0 R/helper-col-wise.r
  3. +1 −0 R/helper-defaults.r
  4. +1 −0 R/helper-try.r
  5. +1 −0 R/indexed-array.r
  6. +1 −0 R/indexed-data-frame.r
  7. +3 −1 R/join.r
  8. +1 −0 R/loop-apply.r
  9. +3 −0 R/ply-array.r
  10. +3 −0 R/ply-data-frame.r
  11. +3 −0 R/ply-list.r
  12. +3 −0 R/ply-mapply.r
  13. +3 −0 R/ply-null.r
  14. +4 −0 R/ply-replicate.r
  15. +5 −0 R/progress.r
  16. +4 −0 R/quote.r
  17. +1 −0 R/rbind.r
  18. +1 −0 R/simplify-array.r
  19. +1 −0 R/simplify-data-frame.r
  20. +1 −0 R/simplify-vector.r
  21. +1 −0 R/split-array.r
  22. +2 −0 R/split-data-frame.r
  23. +1 −0 R/split-indices.r
  24. +3 −0 R/split.r
  25. +5 −0 R/utils.r
  26. +1 −2 man/a_ply.Rd
  27. +2 −3 man/aaply.Rd
  28. +2 −3 man/adply.Rd
  29. +2 −3 man/alply.Rd
  30. +1 −2 man/amv_dim.Rd
  31. +1 −2 man/amv_dimnames.Rd
  32. +0 −3 man/arrange.Rd
  33. +2 −4 man/as.data.frame.function.Rd
  34. +2 −2 man/as.list.split.Rd
  35. +4 −4 man/as.quoted.Rd
  36. +3 −4 man/colwise.Rd
  37. +2 −2 man/compact.Rd
  38. +2 −4 man/count.Rd
  39. +1 −2 man/create_progress_bar.Rd
  40. +0 −1 man/d_ply.Rd
  41. +2 −3 man/daply.Rd
  42. +2 −3 man/ddply.Rd
  43. +2 −2 man/defaults.Rd
  44. +0 −3 man/desc.Rd
  45. +1 −2 man/dims.Rd
  46. +2 −3 man/dlply.Rd
  47. +2 −4 man/each.Rd
  48. +1 −2 man/empty.Rd
  49. +1 −2 man/eval.quoted.Rd
  50. +0 −3 man/failwith.Rd
  51. +2 −3 man/get-split.Rd
  52. +0 −4 man/id.Rd
  53. +2 −4 man/idata.frame.Rd
  54. +4 −4 man/indexed_array.Rd
  55. +5 −5 man/indexed_df.Rd
  56. +1 −2 man/is.discrete.Rd
  57. +2 −1 man/is.formula.Rd
  58. +3 −4 man/join.Rd
  59. +2 −1 man/join.keys.Rd
  60. +2 −2 man/l_ply.Rd
  61. +2 −3 man/laply.Rd
  62. +2 −3 man/ldply.Rd
  63. +0 −3 man/liply.Rd
  64. +1 −2 man/list_to_array.Rd
  65. +3 −4 man/list_to_dataframe.Rd
  66. +1 −2 man/list_to_vector.Rd
  67. +0 −1 man/llply.Rd
  68. +3 −3 man/loop_apply.Rd
  69. +2 −4 man/m_ply.Rd
  70. +3 −4 man/maply.Rd
  71. +0 −3 man/match_df.Rd
  72. +2 −5 man/mdply.Rd
  73. +3 −4 man/mlply.Rd
  74. +2 −5 man/mutate.Rd
  75. +4 −5 man/names.quoted.Rd
  76. +2 −2 man/nunique.Rd
  77. +1 −2 man/print.quoted.Rd
  78. +1 −2 man/print.split.Rd
  79. +2 −2 man/progress_none.Rd
  80. +1 −1 man/progress_text.Rd
  81. +1 −2 man/progress_tk.Rd
  82. +1 −2 man/progress_win.Rd
  83. +0 −3 man/quickdf.Rd
  84. +5 −7 man/quoted.Rd
  85. +1 −2 man/r_ply.Rd
  86. +0 −1 man/raply.Rd
  87. +3 −4 man/rbind.fill.Rd
  88. +2 −4 man/rbind.fill.matrix.Rd
  89. +0 −1 man/rdply.Rd
  90. +1 −1 man/reduce_dim.Rd
  91. +0 −1 man/rlply.Rd
  92. +2 −4 man/splat.Rd
  93. +3 −3 man/split_indices.Rd
  94. +1 −2 man/split_labels.Rd
  95. +3 −3 man/splitter_a.Rd
  96. +2 −2 man/splitter_d.Rd
  97. +0 −3 man/strip_splits.Rd
  98. +0 −3 man/summarise.Rd
  99. +2 −3 man/try_default.Rd
  100. +2 −1 man/tryapply.Rd
  101. +1 −1 man/unrowname.Rd
  102. +2 −4 man/vaggregate.Rd
View
@@ -1,11 +1,13 @@
#' Number of dimensions.
+#'
#' Number of dimensions of an array or vector
#'
#' @param x array
#' @keywords internal
dims <- function(x) length(amv_dim(x))
#' Dimensions.
+#'
#' Consistent dimensions for vectors, matrices and arrays.
#'
#' @param x array, matrix or vector
@@ -14,6 +16,7 @@ amv_dim <- function(x) if (is.vector(x)) length(x) else dim(x)
#' Dimension names.
+#'
#' Consistent dimnames for vectors, matrices and arrays.
#'
#' Unlike \code{\link{dimnames}} no part of the output will ever be
@@ -35,6 +38,7 @@ amv_dimnames <- function(x) {
}
#' Reduce dimensions.
+#'
#' Remove extraneous dimensions
#'
#' @param x array
View
@@ -1,4 +1,5 @@
#' Column-wise function.
+#'
#' Turn a function that operates on a vector into a function that operates
#' column-wise on a data.frame.
#'
View
@@ -1,4 +1,5 @@
#' Set defaults.
+#'
#' Convient method for combining a list of values with their defaults.
#'
#' @param x list of values
View
@@ -26,6 +26,7 @@ failwith <- function(default = NULL, f, quiet = FALSE) {
}
#' Try, with default in case of error.
+#'
#' \code{try_default} wraps try so that it returns a default value in the case of error.
#'
#' \code{tryNULL} provides a useful special case when dealing with lists.
View
@@ -1,4 +1,5 @@
#' An indexed array.
+#'
#' Create a indexed array, a space efficient way of indexing into a large
#' array.
#'
View
@@ -1,4 +1,5 @@
#' An indexed data frame.
+#'
#' Create a indexed list, a space efficient way of indexing into a large data frame
#'
#' @param env environment containing data frame
View
@@ -1,7 +1,9 @@
#' Join two data frames together.
#'
#' Join, like merge, is designed for the types of problems
-#' where you would use a sql join. The four join types return:
+#' where you would use a sql join.
+#'
+#' The four join types return:
#'
#' \itemize{
#' \item \code{inner}: only rows with matching keys in both x and y
View
@@ -1,4 +1,5 @@
#' Loop apply
+#'
#' An optimised version of lapply for the special case of operating on
#' \code{seq_len(n)}
#'
View
@@ -1,4 +1,5 @@
#' Split list, apply function, and return results in an array.
+#'
#' For each element of a list, apply function then combine results into an array
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -48,6 +49,7 @@ laply <- function(.data, .fun = NULL, ..., .progress = "none", .drop = TRUE, .p
#' Split data frame, apply function, and return results in an array.
+#'
#' For each subset of data frame, apply function then combine results into an array
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -91,6 +93,7 @@ daply <- function(.data, .variables, .fun = NULL, ..., .progress = "none", .drop
}
#' Split array, apply function, and return results in an array.
+#'
#' For each slice of an array, apply function then combine results into an array
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
View
@@ -1,4 +1,5 @@
#' Split list, apply function, and return results in a data frame.
+#'
#' For each element of a list, apply function then combine results into a data frame
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -36,6 +37,7 @@ ldply <- function(.data, .fun = NULL, ..., .progress = "none", .parallel = FALSE
}
#' Split data frame, apply function, and return results in a data frame.
+#'
#' For each subset of a data frame, apply function then combine results into a data frame
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -88,6 +90,7 @@ ddply <- function(.data, .variables, .fun = NULL, ..., .progress = "none", .drop
}
#' Split array, apply function, and return results in a data frame.
+#'
#' For each slice of an array, apply function then combine results into a data frame
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
View
@@ -1,4 +1,5 @@
#' Split list, apply function, and return results in a list.
+#'
#' For each element of a list, apply function then combine results into a list
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -102,6 +103,7 @@ llply <- function(.data, .fun = NULL, ..., .progress = "none", .inform = FALSE,
}
#' Split data frame, apply function, and return results in a list.
+#'
#' For each subset of a data frame, apply function then combine results into a list
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -147,6 +149,7 @@ dlply <- function(.data, .variables, .fun = NULL, ..., .progress = "none", .drop
}
#' Split array, apply function, and return results in a list.
+#'
#' For each slice of an array, apply function then combine results into a list
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
View
@@ -40,6 +40,7 @@ mdply <- function(.data, .fun = NULL, ..., .expand = TRUE, .progress = "none", .
}
#' Call function with arguments in array or data frame, returning an array.
+#'
#' Call a multi-argument function with values taken from columns of an data frame or array, and combine results into an array
#'
#' The \code{m*ply} functions are the \code{plyr} version of \code{mapply},
@@ -78,6 +79,7 @@ maply <- function(.data, .fun = NULL, ..., .expand = TRUE, .progress = "none", .
}
#' Call function with arguments in array or data frame, returning a list.
+#'
#' Call a multi-argument function with values taken from columns of an data frame or array, and combine results into a list
#'
#' The \code{m*ply} functions are the \code{plyr} version of \code{mapply},
@@ -119,6 +121,7 @@ mlply <- function(.data, .fun = NULL, ..., .expand = TRUE, .progress = "none", .
}
#' Call function with arguments in array or data frame, discarding results.
+#'
#' Call a multi-argument function with values taken from columns of an data frame or array, and discard results
#'
#' The \code{m*ply} functions are the \code{plyr} version of \code{mapply},
View
@@ -1,4 +1,5 @@
#' Split list, apply function, and discard results.
+#'
#' For each element of a list, apply function and discard results
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -37,6 +38,7 @@ l_ply <- function(.data, .fun = NULL, ..., .progress = "none", .print = FALSE) {
}
#' Split data frame, apply function, and discard results.
+#'
#' For each subset of a data frame, apply function and discard results
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
@@ -66,6 +68,7 @@ d_ply <- function(.data, .variables, .fun = NULL, ..., .progress = "none", .prin
}
#' Split array, apply function, and discard results.
+#'
#' For each slice of an array, apply function and discard results
#'
#' All plyr functions use the same split-apply-combine strategy: they split the
View
@@ -1,4 +1,5 @@
#' Replicate expression and return results in a list.
+#'
#' Evalulate expression n times then combine results into a list
#'
#' This function runs an expression multiple times, and combines the
@@ -41,6 +42,7 @@ rlply <- function(.n, .expr, .progress = "none") {
}
#' Replicate expression and return results in a data frame.
+#'
#' Evalulate expression n times then combine results into a data frame
#'
#' This function runs an expression multiple times, and combines the
@@ -77,6 +79,7 @@ rdply <- function(.n, .expr, .progress = "none") {
#' Replicate expression and return results in a array.
+#'
#' Evalulate expression n times then combine results into an array
#'
#' This function runs an expression multiple times, and combines the
@@ -118,6 +121,7 @@ raply <- function(.n, .expr, .progress = "none", .drop = TRUE) {
}
#' Replicate expression and discard results.
+#'
#' Evalulate expression n times then discard results
#'
#' This function runs an expression multiple times, discarding the results.
View
@@ -1,4 +1,5 @@
#' Create progress bar.
+#'
#' Create progress bar object from text string.
#'
#' Progress bars give feedback on how apply step is proceeding. This
@@ -42,6 +43,7 @@ create_progress_bar <- function(name = "none", ...) {
}
#' Null progress bar
+#'
#' A progress bar that does nothing
#'
#' This the default progress bar used by plyr functions. It's very simple to
@@ -60,6 +62,7 @@ progress_none <- function() {
}
#' Text progress bar.
+#'
#' A textual progress bar
#'
#' This progress bar displays a textual progress bar that works on all
@@ -90,6 +93,7 @@ progress_text <- function(style = 3, ...) {
}
#' Graphical progress bar, powered by Tk.
+#'
#' A graphical progress bar displayed in a Tk window
#'
#' This graphical progress will appear in a separate window.
@@ -122,6 +126,7 @@ progress_tk <- function(title = "plyr progress", label = "Working...", ...) {
}
#' Graphical progress bar, powered by Windows.
+#'
#' A graphical progress bar displayed in a separate window
#'
#' This graphical progress only works on Windows.
View
@@ -45,6 +45,7 @@
is.quoted <- function(x) inherits(x, "quoted")
#' Print quoted variables.
+#'
#' Display the \code{\link{str}}ucture of quoted variables
#'
#' @keywords internal
@@ -53,6 +54,7 @@ is.quoted <- function(x) inherits(x, "quoted")
print.quoted <- function(x, ...) str(x)
#' Compute names of quoted variables.
+#'
#' Figure out names of quoted variables, using specified names if they exist,
#' otherwise converting the values to character strings. This may create
#' variable names that can only be accessed using \code{``}.
@@ -73,6 +75,7 @@ names.quoted <- function(x) {
}
#' Evaluate a quoted list of variables.
+#'
#' Evaluates quoted variables in specified environment
#'
#' @return a list
@@ -99,6 +102,7 @@ eval.quoted <- function(exprs, envir = NULL, enclos = NULL, try = FALSE) {
}
#' Convert input to quoted variables.
+#'
#' Convert characters, formulas and calls to quoted .variables
#'
#' This method is called by default on all plyr functions that take a
View
@@ -1,4 +1,5 @@
#' Combine data.frames by row, filling in missing columns.
+#'
#' \code{rbind}s a list of data frames filling missing columns with NA.
#'
#' This is an enhancement to \code{\link{rbind}} that adds in columns
View
@@ -1,4 +1,5 @@
#' List to array.
+#'
#' Reduce/simplify a list of homogenous objects to an array
#'
#' @param res list of input data
View
@@ -1,4 +1,5 @@
#' List to data frame.
+#'
#' Reduce/simplify a list of homogenous objects to a data frame.
#' All \code{NULL} entries are removed. Remaining entries must be all atomic
#' or all data frames.
View
@@ -1,4 +1,5 @@
#' List to vector.
+#'
#' Reduce/simplify a list of homogenous objects to a vector
#'
#' @param res list of input data
View
@@ -1,4 +1,5 @@
#' Split an array by .margins.
+#'
#' Split a 2d or higher data structure into lower-d pieces based
#'
#' This is the workhorse of the \code{a*ply} functions. Given a >1 d
View
@@ -1,4 +1,5 @@
#' Split a data frame by variables.
+#'
#' Split a data frame into pieces based on variable contained in that data frame
#'
#' This is the workhorse of the \code{d*ply} functions. Based on the variables
@@ -61,6 +62,7 @@ splitter_d <- function(data, .variables = NULL, drop = TRUE) {
}
#' Generate labels for split data frame.
+#'
#' Create data frame giving labels for split data frame.
#'
#' @param list of variables to split up by
View
@@ -1,4 +1,5 @@
#' Split indices.
+#'
#' An optimised version of split for the special case of splitting row
#' indices into groups, as used by \code{\link{splitter_d}}
#'
View
@@ -1,4 +1,5 @@
#' Subset splits.
+#'
#' Subset splits, ensuring that labels keep matching
#'
#' @keywords internal
@@ -18,6 +19,7 @@
}
#' Convert split list to regular list.
+#'
#' Strip off label related attributed to make a strip list as regular list
#'
#' @keywords internal
@@ -32,6 +34,7 @@ as.list.split <- function(x, ...) {
}
#' Print split.
+#'
#' Don't print labels, so it appears like a regular list
#'
#' @keywords internal
Oops, something went wrong.

0 comments on commit 7e9f0f7

Please sign in to comment.