I have Data tibble as below.
For every Year, i want to add New column Total which adds values from Sep:Aug.
I am using as below:
Data%>%mutate(TOTAL= sum(Sep:Aug))
But it is not giving correct values. Also original data can have some NA values as well in data.
YEAR Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug
1 2009 64. 545. 67. 71. 746. 590. 775. 752. 823. 753. 81. 800.
2 2010 8183. 783. 759. 8682. 51. 687. 8115. 743. 885. 708. 669. 780.
3 2011 637. 761. 996. 87. 783. 75. 830. 756. 860. 862. 889. 7419.
4 2012 795. 875. 976. 536. 898. 691. 885. 779. 724. 739. 796. 736.