Learn R Programming

malariaAtlas (version 1.6.3)

convert_to_date_with_trycatch: Tries to convert character into a Date object. If this fails, the program will be stopped and an error message shown to the user

Description

Tries to convert character into a Date object. If this fails, the program will be stopped and an error message shown to the user

Usage

convert_to_date_with_trycatch(input, input_name)

Value

Will return input as a Date is it can be converted into one. Else will stop the program and issue the user with an error message.

Arguments

input

A character of length 1, to convert into a Date object.

input_name

A character string that reflects the name of the input (to inform the user).