Learn R Programming

dataesgobr (version 1.0.0)

check_csv_file: Check if the csv file has a correct format

Description

Check if the csv file has a correct format

Usage

check_csv_file(file, noconfirm = FALSE, filename = NULL,
  outfile = NULL)

Arguments

file

The file's path

noconfirm

A logical, this parameter indicates if the user must confirm to change the name of the file and save in different file

filename

A character, if this parameter is present then the name of the file will be automatically set

outfile

A character the path where the file will be save if it need to be modify, NULL to use the file's directory

Value

A logical

Examples

Run this code
# NOT RUN {
library(dataesgobr)
file <- system.file("extdata", "fichero.csv", package="dataesgobr")
correct <- check_csv_file(file, noconfirm = TRUE)
correct <- check_csv_file(file, noconfirm = TRUE, outfile = tempdir())
correct <- check_csv_file(file, noconfirm = TRUE, filename = "nuevo.csv")
correct <- check_csv_file(file, noconfirm = TRUE, outfile = tempdir())
# }

Run the code above in your browser using DataLab