util.remove.fileextension: Remove File-Extension from Filepath

Description Usage Arguments Details Value Examples

View source: R/util.R

Description

This function takes a filepath including the extension, removes the extension and returns the remaining path.

Usage

1

Arguments

filePath

character string representing a filepath like folder/file.ext.

Details

This function accepts a filepath of the structure folder/file.ext. It determines the last point in the character string via a RegEx operation. The underlying logic is that most file extensions will be separated from the remaining path by that point. Then only the part of the filepath up to that point is extracted and kept. So the resulting filepath should look like folder/file.

Value

character string representing path in parameter filePath without the fileextension.

Examples

1
2
 # Input is 'data.csv' and output should be 'data'.
 KaggleHouse:::util.remove.fileextension("data.csv")

MarcoNiemann/kaggle_house documentation built on May 7, 2019, 2:50 p.m.