Skip to content

Commit db467b5

Browse files
committed
Final prerelease of 0.2.1
1 parent c693137 commit db467b5

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ cran-comments.md
1414
^pkgdown$
1515
^CRAN-RELEASE$
1616
^README\.Rmd$
17+
testers.R

cran-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is a second release of a package wrapper for ggplot2 to draw funnel plots f
1616
There were no ERRORs or WARNINGs.
1717

1818
NOTES on win-builder and r-hub about possibly invalid links.
19-
These refer to DOIs in references in the vignette. I've manually tested all links and they are valid.
19+
These refer to DOIs for references in the vignette. I've manually tested all links and they are valid.
2020

2121
Further note on win-builder and some r-hub builds about a CRAN reference not being in canonical form. This has been changed to use https as suggested.
2222

testsers.R

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
a<-2
2+
b<-2
3+
4+
if(a==1 | a==2 & b==1){
5+
print("yes")
6+
} else print("no")
7+
8+
9+
number.seq<-seq(5,50,5)
10+
11+
t <- 0.5
12+
13+
t * ((qchisq(0.975, 2 * number.seq, lower.tail = FALSE) / 2) / number.seq)
14+
15+
16+
17+
funnel_plot(numerator = c(8, 15,18,8,12, 22), denominator= c(12, 21, 26,15,20, 30), OD_adjust=FALSE,
18+
group = factor(c("a","b","c", "d","e","f")), type = "pr", return_elements = "plot")
19+
)
20+
21+
22+
23+
mod_plot<-data.frame(numerator = c(8, 15,18,8,12, 22), denominator= c(12, 21, 26,15,20, 30),
24+
group = factor(c("a","b","c", "d","e","f")))
25+
26+
mod_plot_agg<-aggregate_func(mod_plot)
27+
28+
aggregate_func<- function(mod_plot) {
29+
30+
mod_plot_agg <- mod_plot %>%
31+
dplyr::group_by(.data$group) %>%
32+
dplyr::summarise(
33+
numerator = as.numeric(sum(.data$numerator)),
34+
denominator = as.numeric(sum(.data$denominator)),
35+
ratio = .data$numerator / .data$denominator
36+
)
37+
38+
return(mod_plot_agg)
39+
40+
}
41+

0 commit comments

Comments
 (0)