Skip to content

Commit

Permalink
minor fix for sf
Browse files Browse the repository at this point in the history
  • Loading branch information
richardli committed Feb 29, 2024
1 parent 4c9a5b2 commit f119eab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/getSmoothedDensity.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#'

#' @export
ridgePlot <- function(x=NULL, nsim = 1000, draws = NULL, year_plot = NULL, strata_plot = NULL, by.year = TRUE, ncol = 4, scale = 2, per1000 = FALSE, order = 0, direction = 1, results = NULL, save.density = FALSE, linewidth = 0.5, ...){
ridgePlot <- function(x=NULL, nsim = 1000, draws = NULL, year_plot = NULL, strata_plot = NULL, by.year = TRUE, ncol = 4, scale = 2, per1000 = FALSE, order = 0, direction = 1, linewidth = 0.5, results = NULL, save.density = FALSE, ...){

years <- y <- `..x..` <- region <- NA

Expand Down
5 changes: 4 additions & 1 deletion R/hatchPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
#' @export

hatchPlot <- function(data, variables, values = NULL, labels = NULL, geo, by.data, by.geo, is.long = FALSE, lower, upper, lim = NULL, lim.CI = NULL, breaks.CI = NULL, ncol = 4, hatch = NULL, border = NULL, size = 1, legend.label = NULL, per1000 = FALSE, direction = 1, ...){

is.sf <- "sf" %in% class(geo)
if(is.sf){
geo = as(geo, 'Spatial')
}

if (is.null(labels) & !is.long) {
labels <- variables
Expand Down
4 changes: 4 additions & 0 deletions man/ridgePlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f119eab

Please sign in to comment.