Skip to content

Commit

Permalink
Update read_table_builder examples to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Oct 18, 2015
1 parent 6e1b994 commit fdc02d1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/loadABS.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
#' @param removeTotal A boolean value. If TRUE removes the rows and columns
#' with totals (default = TRUE).
#' @export
#' @examples \dontrun{
#' read_table_builder('SA1Population.csv')
#' read_table_builder('SA1Population.xlsx',filetype='xlsx',sheet=1,removeTotal=TRUE)
#' sa1pop <- read.csv('SA1Population.csv')
#' read_table_builder(sa1pop)
#' }
#' @examples
#' data_dir <- system.file("extdata", package = "stplanr")
#' t1 <- read_table_builder(file.path(data_dir, 'SA1Population.csv'))
#' t2 <- read_table_builder(file.path(data_dir, 'SA1Population.xlsx'),
#' filetype = 'xlsx', sheet = 1, removeTotal = TRUE)
#' sa1pop <- read.csv(file.path(data_dir, 'SA1Population.csv'))
#' t3 <- read_table_builder(sa1pop)
read_table_builder <- function(dataset, filetype="csv",sheet=1,removeTotal=TRUE) {
if (missing(dataset)) {
stop("Dataset is missing")
Expand Down

0 comments on commit fdc02d1

Please sign in to comment.