jniedballa / camtrapR

R package for camera trap data management
https://jniedballa.github.io/camtrapR/
32 stars 5 forks source link

createSpeciesFolders function does not work correctly with Khmer script #12

Open git-og opened 3 years ago

git-og commented 3 years ago

When using species names with Khmer script, the folder are not created by the createSpeciesFolders function.

With the following species names (or classification groups) used in createSpeciesFolders, only folders for 0_Empty, 1_Deployment and collection, and Bird_unidentified will be created. The folders for the two that contain Khmer characters are not created.

0_Empty 1_Deployment and collection Banteng_ទន្សោង Bird_unidentified Chevrotain_ក្តាន់ញែងតូច

I assume this generalises to other non-Latin characters and to other functions, but I haven't tested it. For a quick workaround, I concatenated the classification groups with a file path, then used lapply(df$path, FUN = dir.create) to create the folders from a list of file paths.