Error in names(label_color[label_color == "organe"]) <- "lysosome" : 'names' attribute [1] must be the same length as the vector [0]
0
0
Entering edit mode
@d2026625
Last seen 19 months ago
United States

library(EnhancedVolcano)

lung <- read.csv(file = "lung_lysoIP_elutes.csv", header = TRUE, sep = ",") lysosome <- read.csv(file = "bone_fine_lysosomes.csv", header = FALSE, sep = ",")

lb <- as.character(lysosome[,1]) label_color <- ifelse( lung[[1]] %in% lb, "orange", "grey")

label_color[is.na(label_color)] <- "grey" names(label_color[label_color == "grey"]) <- "NA" names(label_color[label_color == "organe"]) <- "lysosome"

EnhancedVolcano • 694 views
ADD COMMENT
0
Entering edit mode

Hi,

I can see that you misspelled the color "orange" in your last line of code names(label_color[label_color == "organe"]) <- "lysosome".

Probably this caused the error but you need to give some more info on your dataframes, e.g. run head() and post the result to be able to reproduce your lines of code and check if everything is OK.

Best

ADD REPLY

Login before adding your answer.

Traffic: 555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6