Description Usage Arguments Examples
The main difference to the biomaRt library is here that the filters are given as pairs of variable name and value separated by equal sign. Several filters can be given as a vector of such pairs. For a 'multiselection' filter multiple values can be given as a comma seperated list (see examples.)
1 | get_bm(mart, dataset, filters = NULL, attributes, limit = NULL)
|
mart |
mart object |
dataset |
a dataset |
filters |
a vector variable=value pairs. |
attributes |
vector of attributes |
limit |
a number to limit the amount of returned records |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(biomart2)
#Uncomment the following to run locally
host <- "germplasmdb.cip.cgiar.org"
if(interactive()){
marts <- list_marts(host)
mart <- marts$mart$config[[4]] #dspotatov01_config
dataset<-list_datasets(marts, mart)
x=get_bm(marts, dataset$name[1], , c("acipnumber","cultvrname","female","male"),20)
x=get_bm(marts, dataset$name[1],"fbiostat=500 Advanced or Improved cultivar",
c("acipnumber","cultvrname","female","male"),20)
x=get_bm(marts, dataset$name[1],c("fbiostat=500 Advanced or Improved cultivar","fcountry=ARG,AUS"),
c("acipnumber","cultvrname","female","male"),20)
x=get_bm(marts, dataset$name[1],c("fbiostat=500 Advanced or Improved cultivar","fcountry=ARG,PER"),
c("acipnumber","cultvrname","female","male","country"),200)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.