extractPlateName {twoddpcr} | R Documentation |
If the given filename is of the form "<PlateName>_<WellName>_Amplitude.csv", where <WellName> is of the form A01, B01, etc., then this function can extract the <PlateName> component. Otherwise, an empty string is returned.
extractPlateName(filename)
filename |
A character string corresponding to a filename with .csv extension. |
A character string corresponding to the plate name. This is "" if filename is not in a known format.
Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk
## Get the plate name (recognised format). extractPlateName(c("Sample_Plate_Name_G02_Amplitude.csv")) ## Get the plate name (unrecognised format). extractPlateName(c("Sample_G02.csv"))