convert_to_date_with_trycatch: Tries to convert character into a Date object. If this fails,...

View source: R/ows4r_utils.R

convert_to_date_with_trycatchR Documentation

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)

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).

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.


malariaAtlas documentation built on Oct. 27, 2023, 9:07 a.m.