Running examples in ‘MendelianRandomization-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: phenoscanner
> ### Title: PhenoScanner
> ### Aliases: phenoscanner
> 
> ### ** Examples
> 
> # SNP
> res <- phenoscanner(snpquery="rs10840293")
PhenoScanner V2
Cardiovascular Epidemiology Unit
University of Cambridge
Email: phenoscanner@gmail.com

Information: Each user can query a maximum of 10,000 SNPs (in batches of 100), 1,000 genes (in batches of 10) or 1,000 regions (in batches of 10) per hour. For large batch queries, please ask to download the data from www.phenoscanner.medschl.cam.ac.uk/data.
Terms of use: Please refer to the terms of use when using PhenoScanner V2 (www.phenoscanner.medschl.cam.ac.uk/about). If you use the results from PhenoScanner in a publication or presentation, please cite all of the relevant references of the data used and the PhenoScanner publications: www.phenoscanner.medschl.cam.ac.uk/about/#citation.

[1] "Error: no results found"
> head(res$results)
data frame with 0 columns and 0 rows
> res$snps
data frame with 0 columns and 0 rows
> 
> # Gene
> res <- phenoscanner(genequery="SWAP70")
PhenoScanner V2
Cardiovascular Epidemiology Unit
University of Cambridge
Email: phenoscanner@gmail.com

Information: Each user can query a maximum of 10,000 SNPs (in batches of 100), 1,000 genes (in batches of 10) or 1,000 regions (in batches of 10) per hour. For large batch queries, please ask to download the data from www.phenoscanner.medschl.cam.ac.uk/data.
Terms of use: Please refer to the terms of use when using PhenoScanner V2 (www.phenoscanner.medschl.cam.ac.uk/about). If you use the results from PhenoScanner in a publication or presentation, please cite all of the relevant references of the data used and the PhenoScanner publications: www.phenoscanner.medschl.cam.ac.uk/about/#citation.

Warning in file(con, "r") :
  cannot open URL 'http://www.phenoscanner.medschl.cam.ac.uk/api/?genequery=SWAP70&catalogue=GWAS&p=1e-05&proxies=None&r2=1&build=37': HTTP status was '500 Internal Server Error'
Error in file(con, "r") : 
  cannot open the connection to 'http://www.phenoscanner.medschl.cam.ac.uk/api/?genequery=SWAP70&catalogue=GWAS&p=1e-05&proxies=None&r2=1&build=37'
Calls: phenoscanner -> fromJSON -> paste -> readLines -> file
Execution halted