Description Usage Arguments Value See Also Examples
View source: R/filter-utilities.R
Given some amount of fields and values associated with them, modify the search performed by the HCAExplorer object. This function adds terms to the query that is ultimately performed.
1 2 |
.data |
An HCAExplorer object to query. |
... |
Any number of fields and values to queried against. The binary operators '==' and ' '&' is allowed. See examples. |
.preserve |
Unused argument |
An HCAExplorer object with the desired query performed.
[HCAExplorer()]
HCAExplorer
for the HCAExplorer class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Initiate an HCAExplorer Object
x <- HCAExplorer()
## First we want to perform a search for certain organs.
## Display possible fields looking for organs.
fields(x)
## organs can be queried with "organ".
## What values can the field "organ" have?
values(x, "organ")
## Construct a query looking for projects that involve blood or brain.
y <- x %>% filter(organ %in% c('blood', 'brain'))
y
## Now suppose one would also like to find projects that have a certain
## disease. What field corresponds to disease?
fields(y)
## The "disease" field looks right.
## What possible disease values can be queried upon?
values(y, "disease")
## Add a query for a 'normal' diease state to our search.
y <- y %>% filter(disease == 'normal')
y
## This entire query can also be performed at once in several ways.
x %>% filter(organ == c('blood', 'brain') & disease == 'normal')
x %>% filter(organ == c('blood', 'brain'), disease == 'normal')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.