Error in source(filePath) : 2020-01-18_14_8.R:5:7: unexpected symbol

So I recently got a job and I am trying to run someone else's codes on a bunch of R files. I keep getting this error.
Here is what some of the code looks like:

files <- paste(list_files, sep = '/')
files <- files[which(str_detect(files,'\.R'))]

findItems <- function(filePath){
source(filePath)

Here is the error messgae:

Error in source(filePath) : 2020-01-18_14_8.R:5:7: unexpected symbol
4:
5: Often True
^

What is my mistake? Thanks

Try

files <- files[which(str_detect(files,".*\\.R$")]