getNameFromPath: Get name from path

View source: R/getNameFromPath.R

getNameFromPathR Documentation

Get name from path

Description

Obtains a file name from a path.

Usage

getNameFromPath(path, prefix = NULL, suffix = NULL)

Arguments

path

Character string or vector with the path.

prefix

Character string with the prefix you want to remove from the filename. For example: "ATAC_"

suffix

Characer string with the suffix you want to remove from the filename. For example: ".bam"

Value

A character string or vector with the filename.

Examples

## Not run: 
getNameFromPath("test/data/cov_file.txt", suffix=".txt", preffix="cov_")

## End(Not run)

mireia-bioinfo/pipelineNGS documentation built on Jan. 2, 2023, 11:18 a.m.