I would like to adjust the trace argument (line divisions visible in the heatmap) in the code of the heatmap.2 function in R, to ultimately remove the dotted lines, but keep the solid lines. More generally I would also like to learn how to adjust user-defined functions.
I found a suggestion on how to do this here: https://support.bioconductor.org/p/42819/.
However, when I adjust anything in the code (e.g. line type for the trace argument)(either using the function fix() or making a new function with another name, but with the same code), I start getting errors that certain functions are not found in R, such as invalid() and plot.dendrogram(). I installed separate packages for these functions, but that does not solve the problem. Even worse, when using the fix() approach, heatmap.2 keeps getting these errors from that point, even if I undo the code change, and I have to re-install the gplots package.
I don't understand how the heatmap.2 function runs them without problem, but when I adjust the code, these underlying functions are not found anymore.
TLDR: How can I adjust functions safely in R, particularly the heatmap.2 function?
Any help would be appreciated.