The weekly date format used by Google Trends looks like this:
2004-01-04 - 2004-01-10
This might pose a problem for instance if we want to plot the data. We will need to convert the date interval provided by Google Trends into a single date. We can do so using the following code:#First, import the data
data=read.csv(filePath, header=F, blank.lines.skip=F)
#Then select the ending date of the date interval
data[,1]=sapply(data[,1], substr, start=14, stop=30)
#And convert it into a date
data[,1]=as.Date(data[,1], "%Y-%m-%d")
And then you have a date format that you can use for plots or data analysis.