Skip to content

Commit

Permalink
linting whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
joshqsumner committed May 1, 2024
1 parent 7ddeb69 commit 8477387
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/nlsPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ gamPlot <- function(fit, form, df = NULL, groups = NULL, timeRange = NULL, facet
new_data <- df
}
#* `add predictions`

preds <- data.frame(pred = stats::predict(fit, newdata = new_data))
keep <- which(!duplicated(preds$pred))
plotdf <- df[keep, ]
plotdf$pred <- preds[keep, "pred"]

#* `when implemented SE can be added here, see ?predict.nls`
#*
#* `layer for individual lines if formula was complete`
Expand Down Expand Up @@ -197,7 +197,7 @@ gamPlot <- function(fit, form, df = NULL, groups = NULL, timeRange = NULL, facet
} else {
color_scale <- ggplot2::scale_color_manual(values = rep("#CC4678FF", length(unique(df[[group]]))))
}

#* `plot`
plot <- ggplot(plotdf, ggplot2::aes(group = interaction(.data[[group]]))) +
facet_layer +
Expand All @@ -207,7 +207,7 @@ gamPlot <- function(fit, form, df = NULL, groups = NULL, timeRange = NULL, facet
color_scale +
labs(x = x, y = as.character(form)[2]) +
pcv_theme()

return(plot)
}

Expand Down

0 comments on commit 8477387

Please sign in to comment.