gplots: Interfaces for gplots package for data science pipelines.

Description Usage Arguments Details Value Author(s) Examples

Description

Interfaces to gplots functions that can be used in a pipeline implemented by magrittr.

Usage

1
2
3
4

Arguments

data

data frame, tibble, list, ...

...

Other arguments passed to the corresponding interfaced function.

Details

Interfaces call their corresponding interfaced function.

Value

Object returned by interfaced function.

Author(s)

Roberto Bertolusso

Examples

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
## Not run: 
library(intubate)
library(magrittr)
library(gplots)


## ntbt_bandplot: Plot x-y Points with Locally Smoothed Mean and Standard Deviation
x <- 1:1000
y <- rnorm(1000, mean=1, sd=1 + x/1000 )
dta <- data.frame(x, y)
rm(x, y)

## Original function to interface
bandplot(y ~ x, data = dta)

## The interface puts data as first parameter
ntbt_bandplot(dta, y ~ x)

## so it can be used easily in a pipeline.
dta %>%
  ntbt_bandplot(y ~ x)


## ntbt_lowess: Scatter Plot Smoothing
## Original function to interface
lowess(dist ~ speed, data = cars)

## The interface puts data as first parameter
ntbt_lowess(cars, dist ~ speed)

## so it can be used easily in a pipeline.
cars %>%
  ntbt_lowess(dist ~ speed)

cars %>%
  ntbt_plot(dist ~ speed, main="lowess(cars)") %>%
  ntbt_lowess(dist ~ speed) %>%
  lines(col=2, lty=2)


## ntbt_overplot: Plot multiple variables on the same region,
##                with appropriate axes
data(rtPCR)

## Original function to interface
overplot(RQ ~ Conc..ug.ml. | Test.Substance,
         data = rtPCR,
         subset = Detector == "ProbeType 1" & Conc..ug.ml. > 0,
         same.scale = TRUE,
         log="xy",
         f=3/4,
         main="Detector=ProbeType 1",
         xlab="Concentration (ug/ml)",
         ylab="Relative Gene Quantification"
)## Original function to interface

## The interface puts data as first parameter
ntbt_overplot(rtPCR,
              RQ ~ Conc..ug.ml. | Test.Substance,
              subset = Detector == "ProbeType 1" & Conc..ug.ml. > 0,
              same.scale = TRUE,
              log="xy",
              f=3/4,
              main="Detector=ProbeType 1",
              xlab="Concentration (ug/ml)",
              ylab="Relative Gene Quantification"
)## Original function to interface

## so it can be used easily in a pipeline.
rtPCR %>%
  ntbt_overplot(RQ ~ Conc..ug.ml. | Test.Substance,
                subset = Detector == "ProbeType 1" & Conc..ug.ml. > 0,
                same.scale = TRUE,
                log="xy",
                f=3/4,
                main="Detector=ProbeType 1",
                xlab="Concentration (ug/ml)",
                ylab="Relative Gene Quantification"
  )## Original function to interface


## ntbt_plotmeans: Plot Group Means and Confidence Intervals
data(state)
dta <- data.frame(state.abb, state.region)

## Original function to interface
plotmeans(state.area ~ state.region, data = dta)

## The interface puts data as first parameter
ntbt_plotmeans(dta, state.area ~ state.region)

## so it can be used easily in a pipeline.
dta %>%
  ntbt_plotmeans(state.area ~ state.region)

## End(Not run)


Search within the intubate package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.