R/Mock/mockExpenses.R

#' Mock transaction record
#' @param x dataset from getGoogleSheet
#' @return data frame
#' @export
#' @examples
#' init <- getGoogleSheet("Ravi Transactions")
#' transformTran(init)
createTran <- function(Date="11/3/2017",
                       Store="Trader Joe's",
                       ReceiptNo="1",
                       Beneficiary="Ravi",
                       Category="Produce",
                       Item="extra virgin olive oil",
                       Qty="1",
                       Amount="$5.49",
                       Total="$5.49",
                       Reconciled="Yes"){

  tibble(Date=c(Date),
         Store=c(Store),
         ReceiptNo=c(ReceiptNo),
         Beneficiary=c(Beneficiary),
         Category=c(Category),
         Item=c(Item),
         Qty=c(Qty),
         Amount=c(Amount),
         Total=c(Total),
         Reconciled=c(Reconciled))
}
ravi9884/PersonalFinance documentation built on May 4, 2019, 6:38 p.m.