get.ext: Get the file extension from a file-name.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/reader.R

Description

Get the file extension from a file-name.

Usage

1
get.ext(fn)

Arguments

fn

filename(s) (with full path is ok too)

Value

returns the (usually) 3 character file extension of a filename

Author(s)

Nicholas Cooper nick.cooper@cimr.cam.ac.uk

See Also

rmv.ext

Examples

1
2
get.ext("/documents/nick/mydoc.xlsx")
get.ext(c("temp.cnv","temp.txt"))

Example output

Loading required package: NCmisc

Attaching package: 'reader'

The following objects are masked from 'package:NCmisc':

    cat.path, get.ext, rmv.ext

/documents/nick/mydoc.xlsx 
                    "xlsx" 
temp.cnv temp.txt 
   "cnv"    "txt" 

reader documentation built on May 2, 2019, 9:27 a.m.