Commit 46e8a1b3 authored by Jalbert, Joe's avatar Jalbert, Joe
Browse files

Fixed package build error.

parent cc82d9a8
......@@ -16,4 +16,5 @@ Imports:
officer,
flextable,
grid,
dbplyr
dbplyr,
rlang
......@@ -12,9 +12,11 @@ export(report)
export(se)
export(simplifyAppend)
export(wbsave)
export(wbsave2)
import(dbplyr)
import(flextable)
import(officer)
import(openxlsx)
import(rlang)
import(tidyverse)
importFrom(stats,sd)
......@@ -147,7 +147,10 @@ wbsave=function(df,filename,sheetBy=NULL,keepNames=TRUE, overwrite=TRUE,
#' @param lowBad When TRUE (default), colors low values the first color in the vector (Red by default), if false, inverts the vector
#' @param rule Allows specification of the conditional color numeric range. Defaults to min/max of column
#'
#' @return
#' @return Creates a Excel workbook from the supplied dataframe
#' @import openxlsx
#' @import tidyverse
#' @import rlang
#' @export
#'
#' @examples
......@@ -218,6 +221,7 @@ wbsave2=function(filename,...,
saveWorkbook(wb, filename, overwrite=overwrite)
}
#' Creates a Report with t-tests for a Vector of Outcomes
#'
#' @param df Dataframe to use for the report
......
......@@ -4,7 +4,22 @@
\alias{wbsave}
\title{Flexible Workbook Creation Function}
\usage{
wbsave(df, filename, sheetBy = NULL, keepNames = TRUE, overwrite = T)
wbsave(
df,
filename,
sheetBy = NULL,
keepNames = TRUE,
overwrite = TRUE,
IncludeAll = TRUE,
AllFirst = TRUE,
AllName = "All",
dollarCols = NULL,
percentCols = NULL,
condCols = NULL,
condColors = c("#F8696B", "#FFEB84", "#63BE7B"),
lowBad = TRUE,
rule = NULL
)
}
\arguments{
\item{df}{The dataframe to be saved}
......@@ -16,6 +31,24 @@ wbsave(df, filename, sheetBy = NULL, keepNames = TRUE, overwrite = T)
\item{keepNames}{The function automatically renames the column names with \code{\link[stringr:case]{stringr::str_to_sentence()}}. Setting this to TRUE will leave your column names unaltered}
\item{overwrite}{Sets permissions for overwriting old files. Default is TRUE}
\item{IncludeAll}{Include a tab with the complete data}
\item{AllFirst}{Places the all tab at the beginning of the tabs. If FALSE, placed at end. Only fucntions when IncludeAll==TRUE}
\item{AllName}{Allows the All Data tab to be renamed.}
\item{dollarCols}{Vector of strings specifying the columns to save as ACCOUNTING datatypes in Excel}
\item{percentCols}{Vector of strings specifying the columns to save as PERCENTAGE datatypes in Excel}
\item{condCols}{Vector of strings specifying the columns to apply conditional coloring to in Excel}
\item{condColors}{Vector of length 2 or 3 that defines the colors used in conditional formatting}
\item{lowBad}{When TRUE (default), colors low values the first color in the vector (Red by default), if false, inverts the vector}
\item{rule}{Allows specification of the conditional color numeric range. Defaults to min/max of column}
}
\value{
Creates a Excel workbook from the supplied dataframe
......@@ -23,11 +56,3 @@ Creates a Excel workbook from the supplied dataframe
\description{
Flexible Workbook Creation Function
}
\examples{
library(datasets)
library(tidyverse)
library(openxlsx)
data(iris)
wbsave(iris, "Iris report.xlsx")
wbsave(iris, "Iris report - by Species.xlsx", sheetBy="Species", keepNames=TRUE)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/JoeToolFunctions.R
\name{wbsave2}
\alias{wbsave2}
\title{Flexible Workbook Creation Function}
\usage{
wbsave2(
filename,
...,
sheetNames = NULL,
keepNames = TRUE,
overwrite = TRUE,
dollarCols = NULL,
percentCols = NULL,
condCols = NULL,
condColors = c("#F8696B", "#FFEB84", "#63BE7B"),
lowBad = TRUE,
rule = NULL
)
}
\arguments{
\item{filename}{Name of the resulting .xlsx file}
\item{...}{List of dataframes to have as sheets}
\item{sheetNames}{List of sheet names in order of the ... argument. If left NULL (default), then the dataframe object names will be used as sheet names.}
\item{keepNames}{The function automatically renames the column names with \code{\link[stringr:case]{stringr::str_to_sentence()}}. Setting this to TRUE will leave your column names unaltered}
\item{overwrite}{Sets permissions for overwriting old files. Default is TRUE}
\item{dollarCols}{Vector of strings specifying the columns to save as ACCOUNTING datatypes in Excel}
\item{percentCols}{Vector of strings specifying the columns to save as PERCENTAGE datatypes in Excel}
\item{condCols}{Vector of strings specifying the columns to apply conditional coloring to in Excel}
\item{condColors}{Vector of length 2 or 3 that defines the colors used in conditional formatting}
\item{lowBad}{When TRUE (default), colors low values the first color in the vector (Red by default), if false, inverts the vector}
\item{rule}{Allows specification of the conditional color numeric range. Defaults to min/max of column}
}
\value{
Creates a Excel workbook from the supplied dataframe
}
\description{
Flexible Workbook Creation Function
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment