Welcome to the site!
First order of business - read this please: Welcome to the RStudio Community!
Second order of business (and you've probably picked up on it after completing the first step) - we can help you best if you provide us with a reproducible example (a reprex).
Without a reprex, we can't help you much. What's wrong with your answer? Do you get an error? Do you get an answer, but it's an incorrect one? What is wrong, exactly?
I can't re-run your code (again, because not a reprex), but it probably should work given these conditions:
- Your files are stored in
C:/Users/12543/Documents/Stats.com
folder - You have exactly 9 files named
data20130101.csv
throughdata20130109.csv
- All files are identical in structure
- All files have headers
- All files have temperature as the second column
- There is at least one instance of temperature over 0
I wouldn't likely use such solution, but it seems to be sound, given all conditions above are satisfied.