extract_filename: Extract Information From File Name

Description Usage Arguments Value Author(s) Examples

View source: R/extract_filename.R

Description

This function split a string (file name) as per the requirement of the user. It is useful to extract informations like compound name, plate number etc from the file name.

Usage

1
extract_filename (filename,split = " ",end = ".csv", remove = " ", sep = "-")

Arguments

filename

name of the file (string).

split

regular expressions at which filename has to be split to create different sections.

end

extension (end portion) of filename that need to be removed.

remove

section that need to be omitted after splitting the filename.

sep

symbol to be added to separate sections (obtained after splitting) before combining (default is "-").

Value

A character vector. First element is the unsplit 'filename'. Second element is the processed 'filename'.Other elements are different sections after splitting the 'filename'.

Author(s)

A.A Palakkan

Examples

1
2
extract_filename("L-HEPG2_P3_72HRS.csv")
extract_filename("L_HEPG2_P3_72HRS.csv", split="_",end=".csv",remove="L",sep="")

bioassays documentation built on Oct. 23, 2020, 6:48 p.m.