@@ -46,39 +46,39 @@ plot.see_check_distribution <- function(x, size_point = 2, panel = TRUE, ...) {
4646 # default legend-position
4747 lp <- ifelse(isTRUE(panel ), " right" , " bottom" )
4848
49- p1 <- ggplot(
49+ p1 <- ggplot2 :: ggplot(
5050 dat ,
51- aes(
51+ ggplot2 :: aes(
5252 y = .data $ x ,
5353 x = .data $ y ,
5454 colour = .data $ group
5555 )
5656 ) +
57- geom_linerange(
58- aes(xmin = 0 , xmax = .data $ y ),
59- position = position_dodge(0.4 ),
57+ ggplot2 :: geom_linerange(
58+ ggplot2 :: aes(xmin = 0 , xmax = .data $ y ),
59+ position = ggplot2 :: position_dodge(0.4 ),
6060 linewidth = 0.8 ,
6161 na.rm = TRUE
6262 ) +
63- geom_point(
63+ ggplot2 :: geom_point(
6464 size = size_point ,
65- position = position_dodge(0.4 ),
65+ position = ggplot2 :: position_dodge(0.4 ),
6666 na.rm = TRUE
6767 ) +
68- labs(
68+ ggplot2 :: labs(
6969 y = NULL ,
7070 x = NULL ,
7171 fill = NULL ,
7272 colour = NULL ,
7373 title = " Predicted Distribution of Residuals and Response"
7474 ) +
75- scale_x_continuous(
75+ ggplot2 :: scale_x_continuous(
7676 labels = .percents ,
7777 expand = c(0 , 0 ),
7878 limits = c(0 , max_y )
7979 ) +
8080 scale_color_material_d(reverse = TRUE ) +
81- guides(colour = guide_legend(reverse = TRUE )) +
81+ ggplot2 :: guides(colour = ggplot2 :: guide_legend(reverse = TRUE )) +
8282 theme_lucid(legend.position = lp )
8383
8484 dat1 <- as.data.frame(stats :: density(stats :: residuals(model )))
@@ -90,9 +90,9 @@ plot.see_check_distribution <- function(x, size_point = 2, panel = TRUE, ...) {
9090 dat2 $ x <- round(dat2 $ x )
9191 }
9292
93- p2 <- ggplot(dat1 , aes(x = .data $ x , y = .data $ y )) +
94- geom_line(colour = " #2196F3" ) +
95- labs(x = NULL , y = NULL , title = " Density of Residuals" ) +
93+ p2 <- ggplot2 :: ggplot(dat1 , ggplot2 :: aes(x = .data $ x , y = .data $ y )) +
94+ ggplot2 :: geom_line(colour = " #2196F3" ) +
95+ ggplot2 :: labs(x = NULL , y = NULL , title = " Density of Residuals" ) +
9696 theme_lucid()
9797
9898 # usually, we have an outline for the bars in the same color as the
@@ -106,14 +106,14 @@ plot.see_check_distribution <- function(x, size_point = 2, panel = TRUE, ...) {
106106 bar_color <- theme_lucid()$ panel.background $ fill
107107 }
108108
109- p3 <- ggplot(dat2 , aes(x = .data $ x )) +
110- geom_histogram(
109+ p3 <- ggplot2 :: ggplot(dat2 , ggplot2 :: aes(x = .data $ x )) +
110+ ggplot2 :: geom_histogram(
111111 fill = " #f44336" ,
112112 colour = bar_color ,
113113 binwidth = sqrt(length(vars(.data $ x ))),
114114 na.rm = TRUE
115115 ) +
116- labs(x = NULL , y = NULL , title = " Distribution of Response" ) +
116+ ggplot2 :: labs(x = NULL , y = NULL , title = " Distribution of Response" ) +
117117 theme_lucid()
118118
119119 if (panel ) {
@@ -150,26 +150,26 @@ plot.see_check_distribution_numeric <- function(
150150 # default legend-position
151151 lp <- ifelse(isTRUE(panel ), " right" , " bottom" )
152152
153- p1 <- ggplot(dat , aes(y = .data $ x , x = .data $ y )) +
154- geom_linerange(
155- aes(xmin = 0 , xmax = .data $ y ),
156- position = position_dodge(0.4 ),
153+ p1 <- ggplot2 :: ggplot(dat , ggplot2 :: aes(y = .data $ x , x = .data $ y )) +
154+ ggplot2 :: geom_linerange(
155+ ggplot2 :: aes(xmin = 0 , xmax = .data $ y ),
156+ position = ggplot2 :: position_dodge(0.4 ),
157157 linewidth = 0.8 ,
158158 na.rm = TRUE
159159 ) +
160- geom_point(
160+ ggplot2 :: geom_point(
161161 size = size_point ,
162- position = position_dodge(0.4 ),
162+ position = ggplot2 :: position_dodge(0.4 ),
163163 na.rm = TRUE
164164 ) +
165- labs(
165+ ggplot2 :: labs(
166166 y = NULL ,
167167 x = NULL ,
168168 fill = NULL ,
169169 colour = NULL ,
170170 title = " Predicted Distribution of Vector"
171171 ) +
172- scale_x_continuous(
172+ ggplot2 :: scale_x_continuous(
173173 labels = .percents ,
174174 expand = c(0 , 0 ),
175175 limits = c(0 , max_y )
@@ -179,18 +179,18 @@ plot.see_check_distribution_numeric <- function(
179179 dat1 <- as.data.frame(stats :: density(vec ))
180180 dat2 <- data.frame (x = vec , stringsAsFactors = FALSE )
181181
182- p2 <- ggplot(dat1 , aes(x = .data $ x , y = .data $ y )) +
183- geom_line() +
184- labs(x = NULL , y = NULL , title = " Density of Vector" ) +
182+ p2 <- ggplot2 :: ggplot(dat1 , ggplot2 :: aes(x = .data $ x , y = .data $ y )) +
183+ ggplot2 :: geom_line() +
184+ ggplot2 :: labs(x = NULL , y = NULL , title = " Density of Vector" ) +
185185 theme_lucid()
186186
187- p3 <- ggplot(dat2 , aes(x = .data $ x )) +
188- geom_histogram(
187+ p3 <- ggplot2 :: ggplot(dat2 , ggplot2 :: aes(x = .data $ x )) +
188+ ggplot2 :: geom_histogram(
189189 colour = theme_lucid()$ panel.background $ fill ,
190190 binwidth = sqrt(length(vars(.data $ x ))),
191191 na.rm = TRUE
192192 ) +
193- labs(x = NULL , y = NULL , title = " Distribution of Vector" ) +
193+ ggplot2 :: labs(x = NULL , y = NULL , title = " Distribution of Vector" ) +
194194 theme_lucid()
195195
196196 if (panel ) {
0 commit comments