Skip to contents

This function checks if the specified file is an RDS file and attempts to read it. It returns TRUE if the file is an RDS file and contains a non-null object, otherwise FALSE.

Usage

CheckRDS(File, warning = TRUE)

Arguments

File

A character string specifying the path to the file to be checked. This can not be empty. The function will attempt to determine the file type based on the file extension. If the file extension is not RDS, the function will return FALSE.

warning

logical. If TRUE (default), warnings will be printed if the file does not exist.

Value

A logical value: TRUE if the file is an RDS file and contains a non-null object, FALSE otherwise.

Author

Ahmed El-Gabbas