I use heatmap.2 from gplots to make a heatmap:
library(gplots)
# some fake data
m = matrix(c(0,1,2,3), nrow=2, ncol=2)
# make heatmap
hm = heatmap.2(m)
When I do 'heatmap.2' directly I get a plot that I can output to a device. How can I make the…
I am trying to make a ggplot graph with two regression lines: One below and the other above the median to depict potential effect of age in the sample.
So fa, I have tried:
geom_hline (aes(yintercept = median(df$y)
I do not get anything. I can also…
My question is the same as this one, but I'm seeing the mid color, but not the low color in scale_fill_gradient2(). How can I display all low, mid and high colours in scale_fill_gradient2() ?
No sign of…
I am trying to draw a beanplot with the following code:
library(beanplot)
beanplot(df, col="#cccccc", names="plot-1", yaxt="n", overallline="median", ll=0.00001)
I get the following error:
Error in bw.SJ(x, method = "dpi") : sample is too sparse…
I am trying to reverse the order of the fill factor on the graph, i.e. The 0.5-1 class, must be at the top of the bar.. and then in descending order
gruppo <- c("TM", "TM","TM","TM", "PM", "PM","PM","PM")
valor <-c(1,4,237,3433,1,3,240,3700)
class…
I am working on an exercise asking me "Plot the residuals against Y_hat, each predictor variable, and each two-factor interaction term on separate graphs." Here is a snippet of the data set I am using:
> dput(head(Commercial_Properties,…
I am having trouble figuring how to put 6 separate bar plots onto one pdf.
This is one of the plots for example (they are all very similar):
barplot(druhy, ylim = c(0,50), main = "Míváš často chuť na svíčkovou?", col = c("red", "blue", "green",…
I obtain a matrix from calculation where the values are between 0 and 4. I use the function heatmap.2 to plot.
The idea is to have a color code and with different gradient in function of the cell value:
from 0 to 0.99: gradient of red
from 1 to…
I have used filled contour to convert a matrix into an image with a color gradient.
The names of my axes show on the plot but not the scale and values.
The plot.axes function does not return any error but doesn't add anything to my plot so I guess…
Problem:
I have a data frame called FID and I want to label the number of observations for each mean and the upper and lower confidence intervals. Because the data frame shows the number of observations per month over three years (below), the…
I have used the following code to make this heatmap for my large dataset. Now I want to get the name of rows (name of the genes) for the second cluster (red on the left and green on the right).
First I tried to follow the instructions on this page…
I am trying to do the "Fixed/Random Effects Models using R" exercise found at (https://rstudio-pubs-static.s3.amazonaws.com/372492_3e05f38dd3f248e89cdedd317d603b9a.html)
However, for homework I have been asked to use a different dataset containing…
I am trying to install the gplots package (Xubuntu 18.04.03, R 3.4.4). gplots need caTools. But "dependency ‘caTools’ is not available for package ‘gplots’". This is on a fresh R install. My question is, how do I need to proceed to get gplots…
I can't get my head around centering the text correctly within tables using the textplot funtion.
I have written the following code so far:
jpeg("Equity_Regions_TAA_Scorecard.jpg", width = 7.0, height = 3.5, units="in", res=200, pointsize=5)
…
I've built a great heatmap.2 in R but I am trying to remove the column names at the bottom of the heatmap because they are illegible. I am not able to delete the column names.
I've tried doing labCol = NULL and nothing seems to happen. Additionally,…