[R] Help to organize data

Jackson Rodrigues jacksonmrodrigues at gmail.com
Sun Jun 25 23:27:44 CEST 2017


Hi everybody,

My name is Jackson and come here ask for a help to organize data.
I really need help from you. I have several data sets to organize.

I have to summarize precipitation data collected in different days and
months in only one table.
However, those data are disperse in days and times. Those rainy days have a
more observations than drought ones.

Below you can find a hypothetical example of what I have and I what I need
comes in sequence.

The following table is what I have for a single year.
Notice that number of observations varies from day to day entire year.



*Day*

*Time*

*Prec*

Jan



1

7:00

20mm

1

7:20

15mm

1

7:30

5mm

2

6:00

10mm

2

15:00

16mm

...

...

...mm

31

7:00

2mm

Feb

1

9:00

6mm

1

9:45

30mm

2

6:45

12mm

2

16:00

20mm

2

22:00

60mm

*...*

*...*

*...mm*

28

11:30

25mm

*...*

*...*

*...*

*...mm*

Dec

31

*...*

*...mm*

That way is hard to develop analysis comparing to another year.
Thus, I would like summarize all information in a new (reasonable) table.

I need a command that says: Sum all January 1st, Sum all January 2nd  until
December 31st resulting in something as follows.

*Month       Day->*

*1*

*2*

*3*

*4*

*...*

*31*

*Jan*

40mm

16mm

50mm

66mm

...mm

90mm

*Feb*

60mm

120mm

25mm

45mm

...mm


*...*

...mm

...mm

...mm

...mm

...mm

...mm

*Dec*

120mm

30mm

26mm

90mm

...mm

5mm

The question is: How to manage it?

Does anybody could help me?

Thank you very much in advance

With the best wishes

Jackson M. Rodrigues

	[[alternative HTML version deleted]]



More information about the R-help mailing list