There’s a built in file_path_sans_ext
from the standard install tools package that grabs the file without the extension.
tools::file_path_sans_ext("ABCD.csv")
## [1] "ABCD"
More Related Contents:
- Reshaping data.frame from wide to long format
- ggplot with 2 y axes on each side and different scales
- Split data frame string column into multiple columns
- How to import multiple .csv files at once?
- How to add leading zeros?
- Quickly reading very large tables as dataframes
- Combine two data frames by rows (rbind) when they have different sets of columns
- Counting unique / distinct values by group in a data frame
- What are the differences between “=” and “
- Apply several summary functions on several variables by group in one call
- How to debug “contrasts can be applied only to factors with 2 or more levels” error?
- Formatting Decimal places in R
- How can I trim leading and trailing white space?
- ggplot2 line chart gives “geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?”
- How to name variables on the fly?
- Cleaning up factor levels (collapsing multiple levels/labels)
- Plot multiple columns on the same graph in R [duplicate]
- Concatenate a vector of strings/character
- Convert data.frame column format from character to factor
- Conditional merge/replacement in R
- Subset rows in a data frame based on a vector of values
- Convert UNIX epoch to Date object
- Use variable names in functions of dplyr
- Access variable value where the name of variable is stored in a string
- ending “+” prompt in R
- What do the %op% operators in mean? For example “%in%”?
- Display exact value of a variable in R
- What does “Error: object ” not found” mean?
- Is there anything wrong with using T & F instead of TRUE & FALSE?
- R: How to split a data frame into training, validation, and test sets?