22 April 2017

Calculating Indian Income Tax using R (IndianTaxCalc) - My first R package

 
Calculating Indian Income Tax using R (IndianTaxCalc)
R is a powerful programming package that can perform many wonders with data analytics. The open platform gives the opportunity to develop package packages and share it with the world. Such that recently I created a package for calculating Income Tax in India. The name of the package is IndianTaxCalc. Using this package, you can calculate Income Tax liability for Financial years of
  • Individual resident aged below 60 years,
  • Senior Citizen,
  • Super Senior Citizen,
  • Firm,
  • Local Authority,
  • Any Non-Resident Individual / Hindu Undivided Family / Association of Persons /Body of Individuals / Artificial Judicial Person,
  • Co-operative Society.

The main advantage of using this package is you can calculate tax for any number of the person or group or mixture of both in single command with data in a spreadsheet. You can Download the package from CRAN here. This is my first package developed for R and the process of submitting and getting it listed in CRAN was very comfortable and the reviewers are very friendly.

Example workings on IndianTaxCalc

install.packages("IndianTaxCalc")
library("IndianTaxCalc")
##Income Tax calculation for individual

ITI2017(330000)
[1] 3090
##Income Tax calculation for Senior Citizen
ITI2017(480000,2)
[1] 13390
##Income Tax calculation for group of individuals
employees<-c(250000,350000,200000,7500000)
ITI2017(employees,1)
[1]       0    5150       0 2137250
##Income Tax calculation for dataframe with mixed category of data
sdata <- data.frame(income = c(300000, 400000, 5000000,15000000), category = c(1, 2, 3, 4))
ITI2017(sdata$income,sdata$category)
[1]       0    5150 1339000 5122963