I have some data frames which are loaded from the tabs of an Excel file, which have spaces in their name.
Name <- c("Jon", "Bill", "Maria", "Ben", "Tina")
Age <- c(23, 41, 32, 58, 26)
df <- data.frame(Name, Age)
`df A` <- data.frame(Name, Age)
`df B` <- data.frame(Name, Age)
I would like to clean or repair the object names that have spaces, so that they become:
dfA
dfB
Without specifically referring to these dataframes.
How should I do this?