Error in cor(exprs(gse), use = "c") : no complete element pairs I'm trying to plot a heat map for a &quot;GSE133399&quot;, I retrieved the GSE using GEOquery package and then assigned to an object and then tried to plot a heatmap, but I was not successful, I used the following code in RStudio:
install.packages(&quot;BiocManager&quot;)
BiocManager::install(&quot;GEOquery&quot;)
library(GEOquery)
## change my_id to be the dataset that you want.
my_id &lt;- &quot;GSE133399&quot;
gse &lt;- getGEO(my_id)
length(gse)
gse &lt;- gse[[1]]
gse
pData(gse) ## print the sample information
fData(gse) ## print the gene annotation
exprs(gse) ## print the expression data

## exprs get the expression levels as a data frame and get the distribution
summary(exprs(gse))
exprs(gse) &lt;- log2(exprs(gse))
boxplot(exprs(gse),outline=FALSE)
library(dplyr)
sampleInfo &lt;- pData(gse)
sampleInfo
## source_name_ch1 and characteristics_ch1.1 seem to contain factors we might need for the analysis. Let's pick just those columns

sampleInfo &lt;- select(sampleInfo, source_name_ch1,characteristics_ch1.1)

## Optionally, rename to more convenient column names
sampleInfo &lt;- rename(sampleInfo,group = source_name_ch1, patient=characteristics_ch1.1)
sampleInfo
install.packages(&quot;pheatmap&quot;)
library(pheatmap)
## argument use=&quot;c&quot; stops an error if there are any missing data points

corMatrix &lt;- cor(exprs(gse),use=&quot;c&quot;)

I get this error:
Error in cor(exprs(gse), use = &quot;c&quot;) : no complete element pairs

I also  tried this:
corMatrix &lt;- cor(exprs(gse),use=&quot;c&quot;, use=&quot;complete.obs&quot;)

I get this error:
Error in cor(exprs(gse), use = &quot;c&quot;, use = &quot;complete.obs&quot;) : 
  formal argument &quot;use&quot; matched by multiple actual arguments

I want to achieve this plot:
The GSE133399 dataset contains both ATAC-seq and RNA-seq data, none of which can be queried with GEOquery which works only for microarray data.
exprs(gse) ## print the expression data returns an empty object as you might have noticed, therefore the errors in the lines that follow this command.
On the bottom of https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE133399 at the Supplementary file section you can download FPKM-transformed count data and use these. I would be careful though as FPKM is not ideal for inter-sample comparison. I personally always (if feasable) download the raw data and then process myself, but for a guess on what is going on the FPKMs probably will do.