GEO is repository service offered by NCBI to make genomics and transcriptomics data available to public. There are several ways to download the data from GEO. From R, here is the simple script. To download data from GEO within R, one needs package, by name "GEOquery". This note

Following is the code to download data (CEL files)

#######################################
##GEO Query script to fetch cel files#############
#######################################
library(GEOquery)
gse8771 = getGEOSuppFiles("GSE8771")
untar("GSE8771/GSE8771_RAW.tar", exdir="data")
cels=list.files("data/", pattern = "CEL")
sapply(paste("data", cels, sep="/"), gunzip)
##################################################

getGEOsuppFiles downloads all the cel files as a single tar file and stores it in a new folder with name "GSExxxx" in the current working directory. In the example code, R creates a new folder titled "GSE8771", in current working directory. Files are downloaded as single tar file with gzipped sample files inside, to save bandwidth. User can untar the files either in the current directory or directory of choice. Example code stores untarred archive will with gzipped sample data in a folder titled "data" in current working directory. These files can be gunzipped in a batch, using sapply function. Once gunzipped, user can read the files using functions in "simpleaffy" package