Skip to content

Commit

Permalink
Removes commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
eliocamp committed Jun 9, 2023
1 parent 6c55f71 commit a889aac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
35 changes: 0 additions & 35 deletions R/fortify.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,38 +45,3 @@ fortify.periodic_df <- function(model, data, ...) {
}
}


#' #' @importFrom ggplot2 ggplot_add
#' #' @export
#' ggplot_add.periodic_layer <- function(object, plot, object_name) {
#' gr <- as.character(object$layer$mapping$group)[2]
#' if (!is.null(object$layer$data) & !is.waive(object$layer$data)) {
#' # If data is defined for this layer
#' if (!is.periodic(object$layer$data)) {
#' object$layer$data <- do.call(periodic, c(list(object = object$layer$data),
#' object$cols))
#' }
#' if (is.periodic(object$layer$data)) {
#' object$layer$data <- do.call(wrap, c(list(object = object$layer$data,
#' .group = gr),
#' object$cols))
#' }
#'
#' } else {
#' # If data comes from plot
#' if (!is.periodic(plot$data)) {
#' if (!isTRUE(attr(plot$data, "wrapped"))) {
#' # If is not a wrapped periodic dataframe
#' object$layer$data <- do.call(periodic, c(list(object = plot$data), object$cols))
#' }
#' }
#' if (is.periodic(object$layer$data)) {
#' object$layer$data <- do.call(wrap, c(list(object = object$layer$data,
#' .group = gr),
#' object$cols))
#' }
#' }
#'
#' plot$layers <- append(plot$layers, object$layer)
#' plot
#' }
1 change: 0 additions & 1 deletion R/periodic.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ periodic.data.frame <- function(object, ...) {
data.table::setattr(object[[names(cols)[i]]], "period", period)
if (!inherits(object[[names(cols)[i]]], "sticky")) {
data.table::setattr(object[[names(cols)[i]]], "class", c("sticky", class(object[[names(cols)[i]]])))
# class(object[[names(cols)[i]]]) <- c("sticky", class(object[[names(cols)[i]]]))
}
}
}
Expand Down

0 comments on commit a889aac

Please sign in to comment.