Age of Animals in Human Years

Anshuman Vyas

Introduction

As with humans, advanced years often bring changes in an animal's ability to hear, see and move about easily. Skin condition, appetite and energy levels often degrade with geriatric age, and medical conditions such as cancer, renal failure, arthritis and joint conditions, and other signs of old age may appear.

The age of the animal in human years is calculated by multiplying it by a specific constant. This project does exactly that.

Type of Animals

The user can select from 3 types:

  1. Dog
  2. Cow
  3. Horse

After selecting the type, the user needs to enter the age of the animal, and then click Submit.

Result

Depending on the type of the animal selected and their age, the age in human years in calculated and displayed.

For example, if the user selects Dog as the type and enters 2 for the age, the output should be

## [1] 12

Note

I have used the following conversion rates:

  • 1 Dog year = 6 Human Years
  • 1 Cow year = 7 Human Years
  • 1 Horse year = 3 Human Years