thank you very much i feel so silly for this
col_AveExpr <- colorRamp2(c(quantile(mean)[1], quantile(mean)[4], c("white", "black")))
Error in colorRamp2(c(quantile(mean)[1], quantile(mean)[4], c("white", : argument "colors" is missing, with no default
I am trying to make heatmap from sigs.df using complex heatmap, while making color code for average expression i am getting the above error.
The same code worked perfectly fine as;
col_logFC <- colorRamp2(c(min(l2_val),0, max(l2_val)), c("blue", "white", "black"))
I am following the sanbomics tutortial from youtube
please help
1 answer
It's because you're not closing your first argument to the function:
col_AveExpr <- colorRamp2(c(quantile(mean)[1], quantile(mean)[4], c("white", "black")))
should be
col_AveExpr <- colorRamp2(c(quantile(mean)[1], quantile(mean)[4]), c("white", "black"))
Happens all the time! A habit I've gotten in to lately is putting each argument into a function on it's own line like:
col_AveExpr <- colorRamp2(c(quantile(mean)[1], quantile(mean)[4]),
c("white", "black"))
This helps me catch errors like these a bit more easily.
Log in to answer this question.
add data using dput(df) command where df is your dataframe
you mean like this;
it is still giving me same error it is asking about some argument colors, which i dont seem to find