Dataframe to CSV
df_name_dot_csv(x)
dataframe or tibble
Returns the name of the dataframe as a text.
This function takes a dataframe and extracts the name of the dataframe as text or string. You can then use this string to name a csv file.
df <- as.data.frame(datasets::cars)
df_name_dot_csv(df)
#> [1] "df.csv"