Hello Mr. Holtman,
Thank you very much for your reply and suggestion. This is what each Year's
data looks like;
tmp1 - structure(list(FIPS = c(1001L, 1003L, 1005L), X2026.01.01.1 =
c(285.5533142,
285.5533142, 286.2481079), X2026.01.01.2 = c(283.4977112, 283.4977112,
285.0860291),
It would have been nice if you had at least supplied a subset (~10 lines)
from a couple of files so we could see what the data looks like and test
out any solution. Since you are using 'data.table', you should probably
also use 'fread' for reading in the data. Here is a possible approach of
I have climate data for 20 years for US counties (FIPS) in csv format, each
file represents one year of data. I have extracted the data and reshaped
the yearly data files using melt();
for (i in filelist) {
tmp1 - as.data.table(read.csv(i,header=T, sep=,))
tmp2 - melt(tmp1, id=FIPS)
3 matches
Mail list logo