Skip to content

Commit

Permalink
Fixed warning from upstream ggplot2 chnages
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixErnst committed Mar 24, 2024
1 parent 2e08d8b commit 2cc567e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tRNA
Title: Analyzing tRNA sequences and structures
Version: 1.21.1
Date: 2024-01-17
Version: 1.21.2
Date: 2024-03-24
Authors@R: person("Felix GM",
"Ernst",
email = "felix.gm.ernst@outlook.com",
Expand Down Expand Up @@ -53,5 +53,5 @@ Collate:
'tRNA-utils.R'
'utils.R'
VignetteBuilder: knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
BugReports: https://github.com/FelixErnst/tRNA/issues
36 changes: 18 additions & 18 deletions R/tRNA-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ setMethod(
min <- min(df[[name]]$value)
max <- max(df[[name]]$value)
plot <- ggplot2::ggplot(df[[name]],
ggplot2::aes_(x = ~score,
y = ~value,
group = ~id,
colour = ~id)) +
ggplot2::aes(x = !!ggplot2::sym('score'),
y = !!ggplot2::sym('value'),
group = !!ggplot2::sym('id'),
colour = !!ggplot2::sym('id'))) +
ggplot2::scale_y_continuous(name = writtenNames[[name]]) +
ggplot2::scale_colour_brewer(name = "Sample",
palette = colour_palette) +
Expand All @@ -282,10 +282,10 @@ setMethod(
if(!is.na(dataType[[name]]) &&
dataType[[name]] == "percent"){
plot <- ggplot2::ggplot(df[[name]],
ggplot2::aes_(x = ~score,
y = ~value,
group = ~id,
colour = ~id)) +
ggplot2::aes(x = !!ggplot2::sym('score'),
y = !!ggplot2::sym('value'),
group = !!ggplot2::sym('id'),
colour = !!ggplot2::sym('id'))) +
ggplot2::geom_point() +
ggplot2::scale_y_continuous(name = writtenNames[[name]],
breaks = c(0,0.25,0.5,0.75,1),
Expand All @@ -302,10 +302,10 @@ setMethod(
df[[name]][df[[name]]$value == 1,"value"] <- "Yes"
df[[name]][df[[name]]$value == 0,"value"] <- "No"
plot <- ggplot2::ggplot(df[[name]],
ggplot2::aes_(x = ~score,
y = ~value,
group = ~id,
colour = ~id)) +
ggplot2::aes(x = !!ggplot2::sym('score'),
y = !!ggplot2::sym('value'),
group = !!ggplot2::sym('id'),
colour = !!ggplot2::sym('id'))) +
ggplot2::geom_jitter(height = 0.2) +
ggplot2::scale_y_discrete(name = writtenNames[[name]]) +
ggplot2::scale_colour_brewer(name = "Sample",
Expand All @@ -329,9 +329,9 @@ setMethod(
min <- min(df[[name]]$value)
max <- max(df[[name]]$value)
plot <- ggplot2::ggplot(df[[name]],
ggplot2::aes_(x = ~id,
y = ~value,
colour = ~id)) +
ggplot2::aes(x = !!ggplot2::sym('id'),
y = !!ggplot2::sym('value'),
colour = !!ggplot2::sym('id'))) +
ggplot2::geom_violin(scale = "width") +
ggplot2::geom_jitter(width = 0.2,
height = 0.2) +
Expand Down Expand Up @@ -369,9 +369,9 @@ setMethod(
df[[name]][df[[name]]$value == 1,"value"] <- "Yes"
df[[name]][df[[name]]$value == 0,"value"] <- "No"
plot <- ggplot2::ggplot(df[[name]],
ggplot2::aes_(x = ~id,
y = ~(ggplot2::after_stat(count)/sum(ggplot2::after_stat(count))),
fill = ~colour)) +
ggplot2::aes(x = !!ggplot2::sym('id'),
y = ggplot2::after_stat(count)/sum(ggplot2::after_stat(count)),
fill = !!ggplot2::sym('colour'))) +
ggplot2::geom_bar(position = "fill") +
ggplot2::scale_x_discrete(name = "Sample") +
ggplot2::scale_y_continuous(name = writtenNames[[name]],
Expand Down
8 changes: 8 additions & 0 deletions man/tRNA.Rd

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

0 comments on commit 2cc567e

Please sign in to comment.