Question: Hi,

I want to access an archived version of biomart and select the human dataset.

mart=useMart("ensembl_mart_92",host="http://apr2018.archive.ensembl.org")
works but if I do:

mart=useMart("ensembl_mart_92",host="http://apr2018.archive.ensembl.org", dataset = "hsapiens_gene_ensembl")
it gives error:

Error in checkDataset(dataset = dataset, mart = mart) :
The given dataset: hsapiens_gene_ensembl , is not valid. Correct dataset names can be obtained with the listDatasets() function.

If I look into listDatasets() as suggested I get:

mart=useMart("ensembl_mart_92",host="http://apr2018.archive.ensembl.org")
listDatasets(mart)
[1] dataset description version
<0 rows> (or 0-length row.names)

Also tried other suggestions online that didn't work:

listMarts(archive = TRUE)

Error in listMarts(archive = TRUE) :
The archive = TRUE argument is now defunct.
Use listEnsemblArchives() to find the URL to directly query an Ensembl archive.

listEnsemblArchives()
name date url version current_release
1 Ensembl GRCh37 Feb 2014 http://grch37.ensembl.org GRCh37
2 Ensembl 94 Oct 2018 http://oct2018.archive.ensembl.org 94 *
3 Ensembl 93 Jul 2018 http://jul2018.archive.ensembl.org 93
4 Ensembl 92 Apr 2018 http://apr2018.archive.ensembl.org 92
5 Ensembl 91 Dec 2017 http://dec2017.archive.ensembl.org 91
6 Ensembl 90 Aug 2017 http://aug2017.archive.ensembl.org 90
7 Ensembl 89 May 2017 http://may2017.archive.ensembl.org 89
8 Ensembl 88 Mar 2017 http://mar2017.archive.ensembl.org 88
9 Ensembl 87 Dec 2016 http://dec2016.archive.ensembl.org 87
10 Ensembl 86 Oct 2016 http://oct2016.archive.ensembl.org 86
11 Ensembl 85 Jul 2016 http://jul2016.archive.ensembl.org 85
12 Ensembl 84 Mar 2016 http://mar2016.archive.ensembl.org 84
13 Ensembl 83 Dec 2015 http://dec2015.archive.ensembl.org 83
14 Ensembl 82 Sep 2015 http://sep2015.archive.ensembl.org 82
15 Ensembl 81 Jul 2015 http://jul2015.archive.ensembl.org 81
16 Ensembl 80 May 2015 http://may2015.archive.ensembl.org 80
17 Ensembl 79 Mar 2015 http://mar2015.archive.ensembl.org 79
18 Ensembl 78 Dec 2014 http://dec2014.archive.ensembl.org 78
19 Ensembl 77 Oct 2014 http://oct2014.archive.ensembl.org 77
20 Ensembl 76 Aug 2014 http://aug2014.archive.ensembl.org 76
21 Ensembl 75 Feb 2014 http://feb2014.archive.ensembl.org 75
22 Ensembl 74 Dec 2013 http://dec2013.archive.ensembl.org 74
23 Ensembl 67 May 2012 http://may2012.archive.ensembl.org 67
24 Ensembl 54 May 2009 http://may2009.archive.ensembl.org 54

mart=useMart("ensembl_mart_92", dataset="hsapiens_gene_ensembl", archive=T)

rror in listMarts(host = host, path = path, port = port, includeHosts = TRUE, :
The archive = TRUE argument is now defunct.

mart=useMart("ensembl_mart_92", dataset="hsapiens_gene_ensembl")

Error in useMart("ensembl_mart_92", dataset = "hsapiens_gene_ensembl") :
Incorrect BioMart name, use the listMarts function to see which BioMart databases are available

listMarts()
biomart version
1 ENSEMBL_MART_ENSEMBL Ensembl Genes 94
2 ENSEMBL_MART_MOUSE Mouse strains 94
3 ENSEMBL_MART_SNP Ensembl Variation 94
4 ENSEMBL_MART_FUNCGEN Ensembl Regulation 94

I'm walking in circles here...Suggestions??

Answer: Emily's answer is correct, but you can also use the following which may be easier to remember than specifying the archive URL directly:

mart <- useEnsembl(biomart = "ensembl",
dataset = "hsapiens_gene_ensembl",
version = "92")