Hi,
I am facing the bellow error in Rstudio. however, the same code was working before my data normalization. Now after some data filtration and normalization, I used the same code but showing this issue please help me I am not that much efficient to understand the issue.
View(data)
library(ggplot2)
library(reshape2)
data$SuperPathway.id <- 1:nrow(data)
data_long <- reshape(data,
-
varying = colnames(data)[3:26],
-
v.names = "Abundance",
-
timevar = "target",
-
times = colnames(data)[3:26],
-
direction = "long")
mycols = c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3", "#FF7F00", "#cfa602")
mycols_yaxis <- rep(rep(mycols, c(4, 3, 4, 4, 11, 4)), 28)
data_long$colors <- mycols_yaxis
Error in $<-.data.frame(*tmp*, colors, value = c("#E41A1C", "#E41A1C", :
replacement has 840 rows, data has 600