Get Gene Expression Matrix from GEOquery I am trying to get gene expression matrix for a list of genes
I have for my list: Gene ID, Gene Symbol
How can I get for each gene corresponding expression as array??
I suppose that I will have 
GENE_ID GENE_NAME SAMPLE_1 SAMPLE_2 .....
I am new in that, I don't know more details
I am trying to study relation between diseases and genes(human) using gene expression as features.
Thanks in advance.
The answer to this really depends on the type of data you're retrieving from GEO. Microarray data sets should have a normalised matrix of expression values uploaded as part of the entry. getGEO() from the GEOquery package will return a list of ExpressionSets - in many cases this list will have a length of 1. An ExpressionSet has an exprs() accessor for retrieving the expression matrix. An example (GSE76510, an Illumina HT12 v4 BeadArray dataset):

&gt; library(GEOquery)
&gt; gse76510 &lt;- getGEO('GSE76510')
&gt; names(gse76510)
[1] "GSE76510_series_matrix.txt.gz"
&gt; class(gse76510$GSE76510_series_matrix.txt.gz)
[1] "ExpressionSet"
attr(,"package")
[1] "Biobase"
&gt; exprs(gse76510$GSE76510_series_matrix.txt.gz) %&gt;% head
             GSM2027280 GSM2027281 GSM2027282 GSM2027283 GSM2027284 GSM2027285 GSM2027286
ILMN_1343291  14.936287  14.983927  15.008199  14.830549  15.008199  14.789385  14.891532
ILMN_1343295  13.404168  13.329903  13.289727  13.222221  13.386299  13.240755  13.125056
ILMN_1651199   6.779805   7.189868   7.046952   6.962957   6.697924   6.850950   6.792647
ILMN_1651209   6.983803   6.769702   7.016746   6.954751   6.890472   6.982947   6.915671
ILMN_1651210   6.837042   6.999098   6.895225   6.944250   6.955914   6.917959   6.837368
ILMN_1651221   7.034363   7.025626   6.606457   6.977622   7.051120   6.971884   7.066445
             GSM2027287 GSM2027288 GSM2027289 GSM2027290 GSM2027291
ILMN_1343291  14.891532  14.983927  14.848452  14.913474  15.008199
ILMN_1343295  13.240755  13.010757  13.525999  13.009661  12.998406
ILMN_1651199   6.786784   6.820451   6.851160   7.013586   6.864316
ILMN_1651209   6.983701   6.995199   7.270760   6.901377   6.950876
ILMN_1651210   6.804955   7.033074   6.894117   6.770691   7.000786
ILMN_1651221   7.003035   6.995199   7.050040   6.923861   6.929933


You will be able to filter out a list of required genes using the probe annotation (available in the appropriate annotation.db - in this case, for example, illuminaHumanv4.db).

If the dataset you're interested in is RNA-Seq, you're probably out of luck. There's currently no requirement on data submitters to provide expression estimates with an RNA-Seq dataset, so the ExpressionSet that GEOquery returns will most likely have an empty exprs slot.

Again, an example (GSE117133): 

&gt; gse117133 &lt;- getGEO('GSE117133')
&gt; exprs(gse117133$GSE117133_series_matrix.txt.gz)
 GSM3271892 GSM3271893 GSM3271894 GSM3271895 GSM3271896 GSM3271897