Description Usage Arguments Details Value Author(s) Examples
Interfaces to gplots
functions that can be used
in a pipeline implemented by magrittr
.
1 2 3 4 |
data |
data frame, tibble, list, ... |
... |
Other arguments passed to the corresponding interfaced function. |
Interfaces call their corresponding interfaced function.
Object returned by interfaced function.
Roberto Bertolusso
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)
|
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
$x
[1] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15
[26] 15 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
$y
[1] 4.965459 4.965459 13.124495 13.124495 15.858633 18.579691 21.280313
[8] 21.280313 21.280313 24.129277 24.129277 27.119549 27.119549 27.119549
[15] 27.119549 30.027276 30.027276 30.027276 30.027276 32.962506 32.962506
[22] 32.962506 32.962506 36.757728 36.757728 36.757728 40.435075 40.435075
[29] 43.463492 43.463492 43.463492 46.885479 46.885479 46.885479 46.885479
[36] 50.793152 50.793152 50.793152 56.491224 56.491224 56.491224 56.491224
[43] 56.491224 67.585824 73.079695 78.643164 78.643164 78.643164 78.643164
[50] 84.328698
$call
lowess.formula(formula = dist ~ speed, data = cars)
attr(,"class")
[1] "lowess"
$x
[1] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15
[26] 15 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
$y
[1] 4.965459 4.965459 13.124495 13.124495 15.858633 18.579691 21.280313
[8] 21.280313 21.280313 24.129277 24.129277 27.119549 27.119549 27.119549
[15] 27.119549 30.027276 30.027276 30.027276 30.027276 32.962506 32.962506
[22] 32.962506 32.962506 36.757728 36.757728 36.757728 40.435075 40.435075
[29] 43.463492 43.463492 43.463492 46.885479 46.885479 46.885479 46.885479
[36] 50.793152 50.793152 50.793152 56.491224 56.491224 56.491224 56.491224
[43] 56.491224 67.585824 73.079695 78.643164 78.643164 78.643164 78.643164
[50] 84.328698
$call
lowess.formula(formula = dist ~ speed)
attr(,"class")
[1] "lowess"
$x
[1] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15
[26] 15 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
$y
[1] 4.965459 4.965459 13.124495 13.124495 15.858633 18.579691 21.280313
[8] 21.280313 21.280313 24.129277 24.129277 27.119549 27.119549 27.119549
[15] 27.119549 30.027276 30.027276 30.027276 30.027276 32.962506 32.962506
[22] 32.962506 32.962506 36.757728 36.757728 36.757728 40.435075 40.435075
[29] 43.463492 43.463492 43.463492 46.885479 46.885479 46.885479 46.885479
[36] 50.793152 50.793152 50.793152 56.491224 56.491224 56.491224 56.491224
[43] 56.491224 67.585824 73.079695 78.643164 78.643164 78.643164 78.643164
[50] 84.328698
$call
lowess.formula(formula = dist ~ speed)
attr(,"class")
[1] "lowess"
$`Compound A`
x y
91 0.01 1.11
92 0.01 1.52
93 0.01 1.45
94 0.02 1.99
95 0.03 0.60
96 0.05 0.60
97 0.01 0.95
98 0.01 0.69
99 0.01 0.86
100 0.02 0.76
101 0.03 0.47
102 0.05 0.52
$`Compound B`
x y
36 46.0 1.00
37 68.1 0.42
38 100.0 0.94
39 147.0 0.73
40 215.0 0.54
41 316.0 0.43
42 466.0 0.01
43 681.0 0.41
$`Compound C`
x y
44 4.70 1.96
45 6.80 1.46
46 10.00 1.24
47 14.70 0.71
48 21.50 0.62
51 3.16 1.16
52 4.66 1.01
53 6.81 0.99
54 10.00 0.83
55 14.70 0.58
56 21.50 0.41
57 31.60 0.07
$`Compound D`
x y
79 0.466 2.71
80 0.681 2.67
81 1.000 2.67
82 1.470 2.99
83 2.150 1.34
84 3.160 1.30
85 0.466 1.29
86 0.681 1.10
87 1.000 1.15
88 1.470 1.01
89 2.150 1.08
90 3.160 0.66
$`Compound E`
x y
58 14.700 1.40
59 21.500 0.83
60 31.600 1.44
61 46.600 0.99
62 68.100 0.59
63 100.000 0.52
64 147.000 0.29
65 0.629 1.76
66 1.250 0.70
67 2.500 0.67
68 5.000 0.37
69 10.000 0.62
70 20.125 0.55
71 40.250 0.45
72 21.500 1.08
73 31.600 0.86
74 46.800 0.87
75 68.100 0.83
76 100.000 0.44
77 147.000 0.40
78 215.000 0.17
$`Compound F`
x y
103 0.010 1.52
104 0.014 1.57
105 0.021 1.25
106 0.031 0.37
107 0.046 0.02
108 0.010 1.26
109 0.010 0.87
110 0.012 0.65
111 0.015 2.33
112 0.018 2.09
113 0.021 1.97
114 0.026 0.79
115 0.031 0.03
116 0.012 0.84
117 0.015 0.57
118 0.018 1.36
119 0.022 0.78
120 0.026 0.06
121 0.032 0.01
122 0.012 1.06
123 0.015 1.81
124 0.018 2.04
125 0.022 1.29
126 0.026 0.14
127 0.032 0.03
$`Compound G`
x y
1 183 3.01
2 269 0.74
3 396 0.46
4 582 0.40
5 856 0.43
6 1259 0.07
7 1851 0.11
8 183 1.58
9 269 0.67
10 396 0.32
11 582 0.31
12 856 0.27
13 1259 0.05
14 1851 0.06
15 183 0.72
16 269 1.06
17 396 0.69
18 582 1.48
19 856 0.24
20 1259 0.18
21 1851 0.14
$`Compound H`
x y
22 183 2.21
23 370 1.57
24 396 1.68
25 583 2.63
26 856 2.61
27 1259 1.34
28 1851 1.79
29 183 2.34
30 370 1.62
31 396 0.96
32 583 1.68
33 856 1.20
34 1259 1.13
35 1851 1.18
$`Compound A`
x y
91 0.01 1.11
92 0.01 1.52
93 0.01 1.45
94 0.02 1.99
95 0.03 0.60
96 0.05 0.60
97 0.01 0.95
98 0.01 0.69
99 0.01 0.86
100 0.02 0.76
101 0.03 0.47
102 0.05 0.52
$`Compound B`
x y
36 46.0 1.00
37 68.1 0.42
38 100.0 0.94
39 147.0 0.73
40 215.0 0.54
41 316.0 0.43
42 466.0 0.01
43 681.0 0.41
$`Compound C`
x y
44 4.70 1.96
45 6.80 1.46
46 10.00 1.24
47 14.70 0.71
48 21.50 0.62
51 3.16 1.16
52 4.66 1.01
53 6.81 0.99
54 10.00 0.83
55 14.70 0.58
56 21.50 0.41
57 31.60 0.07
$`Compound D`
x y
79 0.466 2.71
80 0.681 2.67
81 1.000 2.67
82 1.470 2.99
83 2.150 1.34
84 3.160 1.30
85 0.466 1.29
86 0.681 1.10
87 1.000 1.15
88 1.470 1.01
89 2.150 1.08
90 3.160 0.66
$`Compound E`
x y
58 14.700 1.40
59 21.500 0.83
60 31.600 1.44
61 46.600 0.99
62 68.100 0.59
63 100.000 0.52
64 147.000 0.29
65 0.629 1.76
66 1.250 0.70
67 2.500 0.67
68 5.000 0.37
69 10.000 0.62
70 20.125 0.55
71 40.250 0.45
72 21.500 1.08
73 31.600 0.86
74 46.800 0.87
75 68.100 0.83
76 100.000 0.44
77 147.000 0.40
78 215.000 0.17
$`Compound F`
x y
103 0.010 1.52
104 0.014 1.57
105 0.021 1.25
106 0.031 0.37
107 0.046 0.02
108 0.010 1.26
109 0.010 0.87
110 0.012 0.65
111 0.015 2.33
112 0.018 2.09
113 0.021 1.97
114 0.026 0.79
115 0.031 0.03
116 0.012 0.84
117 0.015 0.57
118 0.018 1.36
119 0.022 0.78
120 0.026 0.06
121 0.032 0.01
122 0.012 1.06
123 0.015 1.81
124 0.018 2.04
125 0.022 1.29
126 0.026 0.14
127 0.032 0.03
$`Compound G`
x y
1 183 3.01
2 269 0.74
3 396 0.46
4 582 0.40
5 856 0.43
6 1259 0.07
7 1851 0.11
8 183 1.58
9 269 0.67
10 396 0.32
11 582 0.31
12 856 0.27
13 1259 0.05
14 1851 0.06
15 183 0.72
16 269 1.06
17 396 0.69
18 582 1.48
19 856 0.24
20 1259 0.18
21 1851 0.14
$`Compound H`
x y
22 183 2.21
23 370 1.57
24 396 1.68
25 583 2.63
26 856 2.61
27 1259 1.34
28 1851 1.79
29 183 2.34
30 370 1.62
31 396 0.96
32 583 1.68
33 856 1.20
34 1259 1.13
35 1851 1.18
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.