filext: Extract the extension of a file

filextR Documentation

Extract the extension of a file

Description

Extract the extension of a file

Usage

filext(fn)

Arguments

fn

Character vector with the files whose extensions are to be extracted.

Details

This function extracts the extension of a vector of file names.

Value

A character vector of extension names.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## For a single item:
filext("Albert Einstein.jpg")
## You can do the same for a vector:
filext(c("Hillary Duff.png", "Britney Spears.jpg", "Avril Lavigne.tiff"))

wikiTools documentation built on March 24, 2022, 9:05 a.m.