Note: File naming conventions depend on the platform. It returns normally TRUE for success, FALSE for failure. This function renames all the files mentioned as parameters. To rename a file in R we use file.rename (). How should I correct this? I tried to find similar questions on this site since it seems simple enough, but I couldn't find anything that works. Rename_at(vars(starts_with("Person"),"Id"))īelow are some other variations of "rename" that I tried, but didn't work. Funs%select(starts_with("Person"),contains("Phone"))%>% However, I'm having trouble getting the rename function to work correctly.
Next, I would like to rename the "Person" column in both dataframes to "Id".
I'm attempting to create a simple function that selects columns by string - in this case columns in both dataframes that start with "Person" as well as all columns that contain "Phone". Using the sample data below, I have two dataframes - Df1 and Df2.