Skip to content

Commit

Permalink
Apply automatic stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 20, 2024
1 parent 66f01ff commit e8bbddf
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions R/line.R
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ lineServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limi
if (input$jitter) {
add <- switch(input$options,
"Mean_SE" = c("mean_se", "jitter"),
"Mean_SD" = c("mean_sd" , "jitter"),
"Mean_SD" = c("mean_sd", "jitter"),
"Median_IQR" = c("median_iqr", "jitter")
)
}
Expand Down Expand Up @@ -414,7 +414,6 @@ lineServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limi
size = line.size,
point.size = line.point.size,
linetype = linetype

)

if (input$rev_y) {
Expand All @@ -434,26 +433,28 @@ lineServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limi
}

if (input$label) {




if(con3 <- input$strata != "None"){
if (con3 <- input$strata != "None") {
res.plot <- res.plot +
ggplot2::stat_summary(fun.data = function(x){
return(data.frame(y = mean(x), label = round(mean(x), 2))) },
ggplot2::stat_summary(
fun.data = function(x) {
return(data.frame(y = mean(x), label = round(mean(x), 2)))
},
geom = "label",
aes(label = !!sym(input$y_line),
group = !!sym(input$strata)))
}else{
aes(
label = !!sym(input$y_line),
group = !!sym(input$strata)
)
)
} else {
res.plot <- res.plot +
ggplot2::stat_summary(fun.data = function(x){
return(data.frame(y = mean(x), label = round(do.call(add[1],list(x = x))[[1]], 2))) },
ggplot2::stat_summary(
fun.data = function(x) {
return(data.frame(y = mean(x), label = round(do.call(add[1], list(x = x))[[1]], 2)))
},
geom = "label",
aes(label = !!sym(input$y_line),
))
aes(label = !!sym(input$y_line), )
)
}

}


Expand Down

0 comments on commit e8bbddf

Please sign in to comment.