Skip to content

Commit

Permalink
Merge pull request #26 from sebastiz/Meta_FunctionChanges
Browse files Browse the repository at this point in the history
Changes to the graphics functions documentation
  • Loading branch information
sebastiz authored Sep 28, 2019
2 parents 542a820 + 0fdf32b commit 756796b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
29 changes: 21 additions & 8 deletions R/Graphics.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if (getRversion() >= "2.15.1") {

#' Set the publication theme for all the ggplots
#'
#' This standardises the theme for any ggplot plot produced.
#' If you do use it, like all ggplots it can be extended using the
#' "+" to add whatever else is necessary
#'
#'
#' @import grid
#' @import scales
Expand Down Expand Up @@ -90,9 +94,11 @@ theme_Publication <- function(base_size = 14, base_family = "Helvetica") {
}


#' #' Set the fill theme for all the ggplots
#' #'
#' #'
#' Set the fills for all the ggplots
#'
#' This standardises the fills for any ggplot plot produced.
#' If you do use it, like all ggplots it can be extended using the
#' "+" to add whatever else is necessary
#' @keywords ggplot themes
#' @import grid
#' @import ggthemes
Expand All @@ -107,6 +113,10 @@ scale_fill_Publication <- function(...) {


#' Set the colour theme for all the ggplots
#'
#' This standardises the colours for any ggplot plot produced.
#' If you do use it, like all ggplots it can be extended using the
#' "+" to add whatever else is necessary
#'
#' @import grid
#' @import scales
Expand Down Expand Up @@ -210,7 +220,9 @@ SurveySankey <- function(dfw, ProcPerformedColumn, PatientID) {
#' Create a Circos plot for patient flow
#'
#' This allows us to look at the overall flow from one
#' type of procedure to another using circos plots.
#' type of procedure to another using circos plots. A good example of it's
#' use might be to see how patients move from one state (e.g. having an
#' EMR), to another state (e.g. undergoing RFA)
#' @param dataframe dataframe
#' @param Endo_ResultPerformed the column containing the date of the procedure
#' @param ProcPerformed The procedure that you want to plot (eg EMR,
Expand Down Expand Up @@ -351,17 +363,18 @@ PatientFlow_CircosPlots <-
#' Basic graph creation using the template specified in theme_Publication.
#'
#' This creates a basic graph using the template specified in theme_Publication.
#' It takes a numeric column and plots it against any non-numeric x axis in a ggplot
#' @param dataframe dataframe
#' @param number The numeric column
#' @param xdata The Time column
#' @param xdata The x column
#' @import ggplot2
#' @return Myplot the EDA final plot
#' @return Myplot This is the final plot
#' @keywords Time plots
#' @export
#' @return Myplot
#' @examples
#' # This function plot numeric y vs non-numeric x
#' # Get some numeric columns eg number of biopsies and size
#' # This function plots numeric y vs non-numeric x
#' # Get some numeric columns e.g. number of biopsies and size
#' Mypath$Size <- HistolBxSize(Mypath$Macroscopicdescription)
#' Mypath$NumBx <- HistolNumbOfBx(Mypath$Macroscopicdescription, "specimen")
#' Mypath2 <- Mypath[, c("NumBx", "Size")]
Expand Down
5 changes: 3 additions & 2 deletions R/Module_Barretts.R
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,12 @@ BarrettsParisEMR <- function(Column, Column2) {

#' Get the number of Barrett's biopsies taken
#'
#' This function gets the biopsies taken per endoscopy and compares to the
#' This function gets the number of biopsies taken per
#' endoscopy and compares it to the
#' Prague score for that endoscopy.Endoscopists should be taking a certain
#' number of biopsies given the length of a Barrett's segment so it
#' should be straightforward to detect a shortfall in the number
#' of biopsies being taken.
#' of biopsies being taken. The output is the shortfall per endoscopist
#' @param dataframe dataframe
#' @param Endo_ResultPerformed Date of the Endocscopy
#' @param PatientID Patient's unique identifier
Expand Down
8 changes: 5 additions & 3 deletions R/ReportBuilder.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ if (getRversion() >= "2.15.1")

#' Create a basic consort diagram from dataframes
#'
#' The idea of the package is that it creates a consort diagram using
#' diagrammeR but all the dataframes are automatically filled with the dataframes
#' in the script. The user just provides a pathname for the script
#' This function creates a consort diagram using
#' diagrammeR by assessing all of the dataframes in your script
#' and populating each box in the consort diagram with the
#' number of rows in each dataframe as well as how the dataframes are linked
#' together. The user just provides a pathname for the script
#' @param pathName The string in the Indication to search for
#' @importFrom here here
#' @import DiagrammeR
Expand Down

0 comments on commit 756796b

Please sign in to comment.