rds_or_rda: Determines if a file is a .rda or .rds file

View source: R/rds_or_rda.R

rds_or_rdaR Documentation

Determines if a file is a .rda or .rds file

Description

This function will determine if a file is a .rds or .rda/.RData file and return "rds" or "rda" respectively, or return NA if it is neither or if the file is inaccessible. It uses the magic bits of the file to make a determination, so it is not dependent on the file name extension, and it automatically adapts to whether the file was saved as binary or ascii and if it is compressed or not.

Usage

rds_or_rda(filepaths)

Arguments

filepaths

A character vector

Value

A character vector the same length as filepaths.


2DegreesInvesting/PACTA_analysis documentation built on April 19, 2023, 6:42 p.m.