I have written a function in python that takes two arguments one of which is a file path name. I have wrapped the call to this python function within a loop in R. I want to be able to update a variable in this R for loop and pass the value of this variable to the python function as the file path name. How can I do this?
R code:
for (file in filenames) {
file <- paste("/home/yyy/xx", file, sep="/")
system('python pylib/filefunction.py <TODO: file> divide') # divide is the 2nd argument
}