Re: [R] Melt and compute Max, Mean, Min

2016-11-22 Thread PIKAL Petr
Subject: Re: [R] Melt and compute Max, Mean, Min Hello Petr, Thank you so much for your reply. Apologies for the HTML posting, there's something wrong with my email editor. My goal is to compute the maximum, minimum, and mean for each observation by year and then merge them, so they look l

Re: [R] Melt and compute Max, Mean, Min

2016-11-20 Thread PIKAL Petr
Hi see in line From: Miluji Sb [mailto:miluj...@gmail.com] Sent: Friday, November 18, 2016 3:57 PM To: PIKAL Petr Cc: r-help mailing list Subject: Re: [R] Melt and compute Max, Mean, Min If I do: as.data.frame(apply(df[,-(1:3)],1, mean, na.rm=T)) is it possible to sequentially name the

Re: [R] Melt and compute Max, Mean, Min

2016-11-18 Thread Miluji Sb
NA >> 3 CHL -72 -54 0 0 0.0 0 0 0 2.83824 >> 4 -71 -54 0 0 23.37984 0 0 0 11.80116 >> 5 CHL -70 -54 0 0 0.0 0 0 0 1.24956 >> >> If you want to process all your files you can do it in cycle. Th

Re: [R] Melt and compute Max, Mean, Min

2016-11-18 Thread Miluji Sb
ocess all your files you can do it in cycle. The function > > list.files() > > can be handy for that task. > > Cheers > Petr > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Miluji > Sb > > Sent: Frida

Re: [R] Melt and compute Max, Mean, Min

2016-11-18 Thread PIKAL Petr
16 1:49 PM > To: r-help mailing list > Subject: [R] Melt and compute Max, Mean, Min > > Dear all, > > I have 51 years of data (1960 - 2010) in csv format, where each file > represents > one year of data. Below is what each file looks like. > > These are temperature d

Re: [R] Melt and compute Max, Mean, Min

2016-11-18 Thread Stephen Sefick
Milu, I am unsure what you are trying to do. Please provide a minimal reproducible example, and someone will likely be able to help you with the R code. What have you tried so far? kindest regards, Stephen On 11/18/2016 06:49 AM, Miluji Sb wrote: Dear all, I have 51 years of data (1960 - 2

[R] Melt and compute Max, Mean, Min

2016-11-18 Thread Miluji Sb
Dear all, I have 51 years of data (1960 - 2010) in csv format, where each file represents one year of data. Below is what each file looks like. These are temperature data by coordinates, my goal is to to compute max, min, and mean by year for each of the coordinates and construct a panel dataset.