Description Usage Arguments Value Author(s) See Also Examples
Default is to only remove from a known list of file types, this is to protect files with '.' which may not have an extension This option can be changed, and more types can be specified too.
1 2 |
fn |
filename(s) (with full path is ok too) |
only.known |
logical, only remove extension if in the 'known' list |
more.known |
character vector, add to the list of known extensions |
print.known |
return the list of 'known' file extensions |
returns the file name/path without the file extension
Nicholas Cooper nick.cooper@cimr.cam.ac.uk
1 2 3 4 5 6 7 | rmv.ext(print.known=TRUE)
rmv.ext("/documents/nick/mydoc.xlsx")
rmv.ext(c("temp.cnv","temp.txt","temp.epi"))
# remove anything that looks like an extension
rmv.ext(c("temp.cnv","temp.txt","temp.epi"),only.known=FALSE)
# add to list of known extensions
rmv.ext(c("temp.cnv","temp.txt","temp.epi"),more.known="epi")
|
Loading required package: NCmisc
Attaching package: 'reader'
The following objects are masked from 'package:NCmisc':
cat.path, get.ext, rmv.ext
[1] "TXT" "RDATA" "TAB" "DAT" "CSV" "VCF" "GCM" "BIM" "MAP"
[10] "FAM" "PFB" "SH" "R" "CPP" "H" "DOC" "DOCX" "XLS"
[19] "XLSX" "PDF" "JPG" "BMP" "PNG" "TAR" "GZ" "CNV" "PL"
[28] "PY" "ZIP" "ORG" "RDA" "DSC" "BCK" "ABW" "HTM" "HTML"
/documents/nick/mydoc.xlsx
"/documents/nick/mydoc"
temp.cnv temp.txt temp.epi
"temp" "temp" "temp.epi"
temp.cnv temp.txt temp.epi
"temp" "temp" "temp"
temp.cnv temp.txt temp.epi
"temp" "temp" "temp"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.