[R] Deletion of rows

dila radi dilaradi21 at gmail.com
Tue Mar 11 06:04:19 CET 2014


Hi,

I would like to ask about the deletion of rows in the data.

Assuming I have this kind of data set, which you can refer through the
attachment.


As in the attachment, I have 31 days for each month which is I want to
delete some of the rows according to the real days per month.

For example:

 Jan, March, May, July, Aug, Oct, Dec (these months have 31 days per month,
so no deletion of rows needed)

Feb (28 days except for leap years), Apr, June, Sept, Nov (we have 30 days
per month)

so, for any month that is not 31 days, I want to delete the row accordingly.

The question is, I have data sets from year 1970-2013, and to delete
manually it would be time consuming, so how do I delete those rows
according to the

                             1) month itself
                              2) leap years ( year that is categorized as
leap year, should                                                      have
29 days in Feb)

Hope you can help me. Thanks a lot.

Regards,
Dila


More information about the R-help mailing list