0

I'm still new to R and I'm trying to create an UpSet plot using the package "UpSetR". When i try to run my code i get this error message "Error in start_col:end_col : argument of length 0 In addition: There were 14 warnings (use warnings() to see them)". I will post a screenshot of my data which is a list type in a binary form. and i will also paste my code, please help me identify the problem

#Code:
library(UpSetR)
library(ggplot2)
library(readxl)
Plot_df <- read_excel("nutrients and expressions.xlsx",
col_types = c("numeric", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric"))
View(Plot_df)
head(Plot_df, 5)
colnames(Plot_df)

#making a vector with
#text_scale_options <- c(intersection size title, intersection size tick lables,

# set size title,

# set size tick labels,

    #                    set names, numbers above bars)

#i created different options so i could see which ones i looks better
text_scale_options1 <- c(1, 1, 1, 1, 0.75, 1)
text_scale_options2 <- c(1.3, 1.3, 1, 1, 2, 0.75)
text_scale_options3 <- c(1.5, 1.25, 1.25, 1, 2, 1.5)

#setting colors
#this can also be done with hexadecimals
main_bar_col <- c("violetred4")
sets_bar_col <- c("turquoise4")
matrix_col <- c("slateblue4")
shade_col <- c("wheat4")

mb_ratio1 <- c(0.55, 0.45)
set_vars <- c("One", "Two", "Three", "Four", "Five", "Six", "Seven")

upset(Plot_df,
sets = set_vars,
mb.ratio = mb_ratio1,
mainbar.y.label = "Protein counts by pattern of succession stages",
sets.x.label = "Protein count by succession stage",
order.by = "freq",
show.numbers = FALSE,
point.size = 2,
line.size = 1,
text.scale = text_scale_options3,
main.bar.color = main_bar_col,
sets.bar.color = sets_bar_col,
matrix.color = matrix_col,
shade.color = shade_col)

dataframe photo after after importing in R

I don't even know what to do from here!

Obby
  • 1
  • 1

0 Answers0