Replace file extension by specified ending

replace_extension(filename, new_ext = "_converted.csv")

Arguments

filename

name of file with extension

new_ext

string, new ending of full file name

Value

new file name

Details

Replace file extension by specified ending Old extension is removed and "_converted.csv" is added

Examples

replace_extension("../test/demo.xlsx")
#> [1] "../test/demo_converted.csv"