Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Final fixes for R CMD check

  • Loading branch information...
commit ac9fc5dc31155526f58444a898ec3d38055f5216 1 parent 20b9d7b
@hadley authored
View
1  .Rbuildignore
@@ -1,2 +1,3 @@
benchmark
src/.gitignore
+man-roxygen
View
2  NAMESPACE
@@ -27,6 +27,8 @@ S3method(names,quoted)
S3method(print,indexed)
S3method(print,quoted)
S3method(print,split)
+S3method(round_any,POSIXct)
+S3method(round_any,numeric)
export(.)
export(a_ply)
export(aaply)
View
2  R/indexed-data-frame.r
@@ -22,6 +22,8 @@ indexed_df <- function(data, index, vars) {
}
extract_rows <- function(x, i) {
+ if (!is.data.frame(x)) return(x[i, , drop = FALSE])
+
n <- ncol(x)
out <- lapply(seq_len(n), extract_col_rows, df = x, i = i)
View
2  R/round-any.r
@@ -24,10 +24,12 @@ round_any <- function(x, accuracy, f = round) {
UseMethod("round_any")
}
+#' @S3method round_any numeric
round_any.numeric <- function(x, accuracy, f = round) {
f(x / accuracy) * accuracy
}
+#' @S3method round_any POSIXct
round_any.POSIXct <- function(x, accuracy, f = round) {
tz <- format(x[1], "%Z")
xr <- round_any(as.numeric(x), accuracy, f)
Please sign in to comment.
Something went wrong with that request. Please try again.