Get RefSeq accession numbers with versions
I don't believe this is possible using biomaRt, nor using AnnotationHub.

I have two suggestions, neither of them very satisfactory. First, you can specify an Ensembl archive for biomaRt, for example:

mart72.hs &lt;- useMart("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl", 
                      host = "jun2013.archive.ensembl.org")


Of course, that requires that you have some idea of the date for each accession version and that the archives span that date - so not especially useful.

The other option is to access EUtils using e.g. rentrez, which does allow search by version number:

library(rentrez)
es &lt;- entrez_search("nuccore", "NM_002084.1 NM_002084.2")
es$ids

[1] "4504104" "6006000"


So knowing the accession, you could simply append 1, 2, 3... to it, run the search and see if UIDs come back, then get them using entrez_fetch.

EDIT: here's a quick and dirty function which takes an accession as query, appends version = 1, fetches the ID, then increments the version and repeats until no more results are returned. It is not well-tested!

getVersions &lt;- function(accession) {
  require(rentrez)
  ids &lt;- character()
  version &lt;- 1
  repeat({
    es &lt;- entrez_search("nuccore", paste0(accession, ".", version))
    if(length(es$ids) == 0) {
      break
    }
    ids[version] &lt;- es$ids
    version &lt;- version + 1
  })
  ids
}


Example:

getVersions("NM_002084")
[1] "4504104"    "6006000"    "89903006"   "1048339180"