Skip to content

Commit

Permalink
Merge pull request #79 from FrdVnW/iss-import-empty-code
Browse files Browse the repository at this point in the history
bug in read code file. Now import_data is ok without a codes.csv
  • Loading branch information
elinw authored Oct 30, 2018
2 parents d18a3b4 + 205ea09 commit c91195d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/read_in_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,15 @@ read_code_data <- function(file_path = "codes/codes.csv", codes_df_path = "",
col_types = "icc")
# validate column names etc here
#code_data$code <- as.character(code_data$code)

# try catch this save
saveRDS(code_data, file = codes_df_path)
invisible(TRUE)
} else {
code_data <- create_empty_code_file(project_name = project_path , codes_df_path = codes_df_path)
create_empty_code_file(project_name = project_name , codes_df_path = codes_df_path)
}

# try catch this save
saveRDS(code_data, file = codes_df_path)
invisible(TRUE)

}

#' Create an empty codes data set
Expand Down

0 comments on commit c91195d

Please sign in to comment.