Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions R/scales_cross_blended.R
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 494 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L494

Added line #L494 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 497 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L497

Added line #L497 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_fill_gradientn(...,
Expand Down Expand Up @@ -536,8 +538,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 541 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L541

Added line #L541 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 544 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L544

Added line #L544 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_colour_gradientn(...,
Expand Down Expand Up @@ -581,8 +585,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 588 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L588

Added line #L588 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 591 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L591

Added line #L591 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_fill_stepsn(
Expand Down Expand Up @@ -627,8 +633,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 636 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L636

Added line #L636 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 639 in R/scales_cross_blended.R

View check run for this annotation

Codecov / codecov/patch

R/scales_cross_blended.R#L639

Added line #L639 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_colour_stepsn(
Expand Down
8 changes: 8 additions & 0 deletions R/scales_grass.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@
if (!is.null(values)) res <- scales::rescale(res)
} else {
if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 246 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L246

Added line #L246 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 249 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L249

Added line #L249 was not covered by tests
res <- scales::rescale(values, from = limits)
}

Expand Down Expand Up @@ -296,8 +298,10 @@
if (!is.null(values)) res <- scales::rescale(res)
} else {
if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 301 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L301

Added line #L301 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 304 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L304

Added line #L304 was not covered by tests
res <- scales::rescale(values, from = limits)
}

Expand Down Expand Up @@ -354,8 +358,10 @@
if (!is.null(values)) res <- scales::rescale(res)
} else {
if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 361 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L361

Added line #L361 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 364 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L364

Added line #L364 was not covered by tests
res <- scales::rescale(values, from = limits)
}

Expand Down Expand Up @@ -408,8 +414,10 @@
if (!is.null(values)) res <- scales::rescale(res)
} else {
if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 417 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L417

Added line #L417 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 420 in R/scales_grass.R

View check run for this annotation

Codecov / codecov/patch

R/scales_grass.R#L420

Added line #L420 was not covered by tests
res <- scales::rescale(values, from = limits)
}

Expand Down
8 changes: 8 additions & 0 deletions R/scales_hypso.R
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 473 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L473

Added line #L473 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 476 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L476

Added line #L476 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_fill_gradientn(...,
Expand Down Expand Up @@ -514,8 +516,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 519 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L519

Added line #L519 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 522 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L522

Added line #L522 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_colour_gradientn(...,
Expand Down Expand Up @@ -559,8 +563,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 566 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L566

Added line #L566 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 569 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L569

Added line #L569 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_fill_stepsn(
Expand Down Expand Up @@ -604,8 +610,10 @@
if (alpha != 1) hexcol <- ggplot2::alpha(hexcol, alpha = alpha)

if (is.null(values)) values <- hypsocol$limit
if (anyNA(values)) values <- values[!is.na(values)]

Check warning on line 613 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L613

Added line #L613 was not covered by tests
# Reescale
if (is.null(limits)) limits <- range(values)
if (anyNA(limits)) limits[is.na(limits)] <- range(values)[is.na(limits)]

Check warning on line 616 in R/scales_hypso.R

View check run for this annotation

Codecov / codecov/patch

R/scales_hypso.R#L616

Added line #L616 was not covered by tests
res <- scales::rescale(values, from = limits)

ggplot2::scale_colour_stepsn(
Expand Down
Loading