undoQuery: Undo one or multiple queries performed on an object

Description Usage Arguments Value See Also Examples

Description

Undo one or multiple queries performed on an HCAExplorer object then return the result.

Usage

1
2
## S4 method for signature 'HCAExplorer'
undoQuery(x, n = 1L)

Arguments

x

An HCAExplorer object

n

integer(1). The number of queries to step back from.

Value

An HCAExplorer object with the changes applied to it.

See Also

HCAExplorer for the HCAExplorer class, resetQuery for reseting the entire query.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 ## 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 brain.
 x <- x %>% filter(organ == brain)
 x

 ## Now select the first two projects by row.
 x <- x[1:2,]
 x

 ## Finally we can remove the previous query using undoQuery().
 ## search.
 x <- undoQuery(x, n = 1)
 x

HCAExplorer documentation built on Nov. 8, 2020, 5:45 p.m.