![]() ![]() "C:/LedgesR/ledges_7.JPG" "C:/LedgesR/ledges_8.JPG" "C:/LedgesR/ledges_9.JPG" "C:/LedgesR/ledges_4.JPG" "C:/LedgesR/ledges_5.JPG" "C:/LedgesR/ledges_6.JPG" "C:/LedgesR/ledges_1.JPG" "C:/LedgesR/ledges_2.JPG" "C:/LedgesR/ledges_3.JPG" I have saved these in the folder C:/LedgesR. Using 1:length(old_files)gives us a vector of the exact same length as old_files. For example, instead of DSCN7155.JPG, I want a file name like ledges_1.JPG. Now we can name all the new files that we want. Too bad that vector.files() doesn’t quite have the same ring! > old_files old_files This will make a big difference later on. Using the list.files()function, I see them all “listed.”Īctually, this is a vector, not a list, which is its own thing in R. I have saved these photos under C:/Ledgeson my computer. To rename the files, we will simply list all the current files, list the names of the new files that we want, then switch them around. I thought that this would be a loop and even an apply() function, but it turns out all that’s needed is a list of the file names. Ready to “automate the boring stuff with R?” Check out my course, R Explained for Excel Users. ![]() While it was cool to learn for this post that DSCN stands for “Digital Still Capture – Nikon,” it means nothing to me!įor this post, I will be renaming the files that I took from Worden Ledges into a more “human-readable” name. I hate the way files are run in a camera. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |