Hallo,

I would like to create such an expression matrix:


    GENE ID/SAMPLE     sample1     sample2     sample3     sample4     sample-n
    gene1              logFC       ...         ...         ...         ...
    gene2              ...         ...         ...         ...         ...
    gene3              ...         ...         ...         ...         ...
    gene4              ...         ...         ...         ...         ...
    gene-n             ...         ...         ...         ...         ...


using data from GSE at GEO. I will be grateful for any suggestions or just codes.

Second thing:

How to get such an expression matrix after limma DE analysis? How to modify limma codes? I will appreciate any suggestions or codes.

Thanks in advance, one more time.

Regards!
Something like this should about do it. 

    library(GEOquery)
    # assumes only one platform in the GSE
    gse = getGEO('GSEXXXX')[[1]]

gse is an ExpressionSet, so all the usual ExpressionSet methods work as expected. In particular, we can use `fData()` to get the feature information (gene information) and the `exprs()` method to get the actual values. 

    write.table(data.frame(fData(gse),exprs(gse)),sep="\t",row.names=FALSE,file='abc.txt')

You may need to use a subset of the columns in `fData` to match your needs.
