I have a folder with 100+ images. I want to run an google vision analysis on each of them in R. Instead of running the analysis on one image at a time I want to create a function which will access each image one by one and run the analysis.
Using following code:
getGooglevisionResponse(file.choose(),feature = 'text_detection')
I am using file.choose()
to choose one file at a time but I want to create a loop which will dynamically select each image and run the analysis on them ..
Used list.files()
but getting below error
the following condition has length >1 and only the first element will be used
found one post but that is in python unable to replicate it in R