Skip to content

Commit

Permalink
debugged plotLine for unconventional row naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Manon Martin authored and Manon Martin committed Jun 6, 2023
1 parent df7f086 commit 43cff48
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/plotLine.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ plotLine <- function(Y, rows = 1, type = c("l", "p", "s"),

Y <- t(Y[rows,, drop=FALSE])

mn_xy <- make.names(rows) # corrects the naming of variables
# mn_xy <- make.names(rows) # corrects the naming of variables
# colnames(Y) <- mn_xy

Y <- Y %>% as.data.frame() %>%
tibble::rownames_to_column(var = "x_axis")

Y_long <- Y %>% tidyr::pivot_longer(all_of(mn_xy), names_to = "rownames")
Y_long <- Y %>% tidyr::pivot_longer(all_of(rows), names_to = "rownames")

if (xaxis_type == "numeric") {
rn <- Y_long$x_axis
Expand Down Expand Up @@ -177,7 +178,7 @@ plotLine <- function(Y, rows = 1, type = c("l", "p", "s"),
}


if(! stacked){
if(!stacked){
# facet_wrap
if(is.null(facet_label)){
fig <- fig +
Expand Down

0 comments on commit 43cff48

Please sign in to comment.