From 0d65594e957a56288a48956efcb05489c275dc5d Mon Sep 17 00:00:00 2001 From: Pankaj Das Date: Sat, 26 Aug 2023 12:10:02 +0000 Subject: [PATCH] version 0.1.1 --- DESCRIPTION | 12 +- LICENSE | 2 + MD5 | 12 +- build/vignette.rds | Bin 0 -> 197 bytes inst/doc/HealthCal.R | 44 +++++ inst/doc/HealthCal.Rmd | 58 ++++++ inst/doc/HealthCal.html | 408 ++++++++++++++++++++++++++++++++++++++++ man/BFPF.Rd | 2 +- man/BMR.Rd | 2 +- vignettes/HealthCal.Rmd | 58 ++++++ 10 files changed, 588 insertions(+), 10 deletions(-) create mode 100644 LICENSE create mode 100644 build/vignette.rds create mode 100644 inst/doc/HealthCal.R create mode 100644 inst/doc/HealthCal.Rmd create mode 100644 inst/doc/HealthCal.html create mode 100644 vignettes/HealthCal.Rmd diff --git a/DESCRIPTION b/DESCRIPTION index bb3b961..0141604 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,15 @@ Package: HealthCal Type: Package Title: Health Calculator -Version: 0.1.0 -Author: Pankaj Das [aut, cre] +Version: 0.1.1 +Author: Pankaj Das [aut, cre]() Maintainer: Pankaj Das Description: Health Calculator helps to find different parameters like basal metabolic rate, body mass index etc. related to fitness and health of a person. -License: GPL-3 +License: MIT + file LICENSE Encoding: UTF-8 +Suggests: knitr, rmarkdown +VignetteBuilder: knitr NeedsCompilation: no -Packaged: 2023-08-10 12:15:40 UTC; Pankaj +Packaged: 2023-08-26 11:58:33 UTC; Pankaj Repository: CRAN -Date/Publication: 2023-08-11 12:23:46 UTC +Date/Publication: 2023-08-26 12:10:02 UTC diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2838572 --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2023 +COPYRIGHT HOLDER: Pankaj Das diff --git a/MD5 b/MD5 index 159584b..239beb6 100644 --- a/MD5 +++ b/MD5 @@ -1,10 +1,16 @@ -e3d9cd210c69617f21030c3c16d0c963 *DESCRIPTION +2020f0cc6b18bf01c45f142e4e1b09ec *DESCRIPTION +95f6c72862219ec03e6bfc55f637766e *LICENSE df390c53434517b304ac5db487184641 *NAMESPACE 14ff590b823f406bc456744ac2f78012 *R/BFPF.R fcd242bd9484a36820db966851b0bc78 *R/BFPM.R 403c55361b7938ca21cb84b815fdb7fb *R/BMI.R fee2977f5633461624eb4649adc8852b *R/BMR.R -524837206e319a0ccba1da7b84db9e8b *man/BFPF.Rd +bf5545efcb171b931bfa05799c2cb4a3 *build/vignette.rds +28b48270e1e134419b465f46c4cf9079 *inst/doc/HealthCal.R +bf28e50212b33f21ea1a7f47ff403a29 *inst/doc/HealthCal.Rmd +0a7489f5c6881aad439289e6d3fa764e *inst/doc/HealthCal.html +3b04f3871083bd5d3a2b4f23fd78992f *man/BFPF.Rd 870c4a87fa1a00e1c8c95e1abba14a00 *man/BFPM.Rd 71a69af8cdd4336520981e0040abb549 *man/BMI.Rd -8d4fc6232aab5398802629bf86070029 *man/BMR.Rd +9e4bee7891dd78653455c4dd8cfaf074 *man/BMR.Rd +bf28e50212b33f21ea1a7f47ff403a29 *vignettes/HealthCal.Rmd diff --git a/build/vignette.rds b/build/vignette.rds new file mode 100644 index 0000000000000000000000000000000000000000..78bda7989f7d90f6d4bb4b76f5e7f60be6004a86 GIT binary patch literal 197 zcmV;$06PC4iwFP!0000028-ZgU|?WkU}0utU}6R`nT3G_8xRWsF(U&D11FH?^+-+3 zDamk7%+U+VO+l07giE4H@F8?%l;onzawC}ubb&Bf3ZeuESeTHMvgRe`rWT{=XLm_0 zNX<(D3ID^cpYcDM77p*!%JTdom>v{0Y)~~UZkai$FndEXOW+*l02enXlQ9V04H)L5 zxSz8qzg!RI2VPKkHvozMK!EPik-8lXp?2 literal 0 HcmV?d00001 diff --git a/inst/doc/HealthCal.R b/inst/doc/HealthCal.R new file mode 100644 index 0000000..624553a --- /dev/null +++ b/inst/doc/HealthCal.R @@ -0,0 +1,44 @@ +## ---- include = FALSE--------------------------------------------------------- +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) + +## ----setup-------------------------------------------------------------------- +#Example how the package works +library(HealthCal) + +#BFP calculation + +# The body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat. + +#Input data that includes height, weight and age of a female +dataset47=c(175,90,25) + +#The body fat percentage (BFP) of female can be found using +BFPF(dataset47) + +#Input data that includes height, weight and age of a male +dataset46=c(175,90,25) + +##The body fat percentage (BFP) of male can be found using +BFPF(dataset47) + +#BMR calculation +#Basal metabolic rate (BMR) is the rate of energy expenditure per unit time by endothermic animals at rest. The basal metabolic rate (BMR) of a person can be calculated using the Harris-Benedict equation, also known as the Harris-Benedict principle (1918). The function was created using this Harris-Benedict principle.The amount that should be consumed each day in kilocalories to maintain one's present weight can be calculated by multiplying the predicted BMR value by a factor that reflects the person's level of activity. +# Input data that includes height, weight and age of a person (male/female) +dataset45=c(175,90,25) + +#BMR of the person can be found using +BMR(dataset45) + +#The body mass index (BMI) is a measurement based on a person's mass (weight) and height. The BMI is calculated by dividing the body weight by the square of the height, and it is expressed in kilogrammes per square metre (kg/m2) since weight is measured in kilogrammes and height is measured in metres. The function was created using formula given by Keys et al. (1972). + +#BMR calculation +#Input data that includes height and weight of a person +dataset44=c(175,90) + +#BMI of the person can be found using +BMI(dataset44) + + diff --git a/inst/doc/HealthCal.Rmd b/inst/doc/HealthCal.Rmd new file mode 100644 index 0000000..5b49dc9 --- /dev/null +++ b/inst/doc/HealthCal.Rmd @@ -0,0 +1,58 @@ +--- +title: "HealthCal" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{HealthCal} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` +## Introduction + +\*\*\*\*
*The HealthCal R package is designed to find out different parameters like basal metabolic rate, body mass index etc. related to fitness and health of a person. This package shows the values of the parameters with the present health status (healthy or not) according the WHO prescribed norms.* + +\*\*\*\*
+```{r setup} +#Example how the package works +library(HealthCal) + +#BFP calculation + +# The body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat. + +#Input data that includes height, weight and age of a female +dataset47=c(175,90,25) + +#The body fat percentage (BFP) of female can be found using +BFPF(dataset47) + +#Input data that includes height, weight and age of a male +dataset46=c(175,90,25) + +##The body fat percentage (BFP) of male can be found using +BFPF(dataset47) + +#BMR calculation +#Basal metabolic rate (BMR) is the rate of energy expenditure per unit time by endothermic animals at rest. The basal metabolic rate (BMR) of a person can be calculated using the Harris-Benedict equation, also known as the Harris-Benedict principle (1918). The function was created using this Harris-Benedict principle.The amount that should be consumed each day in kilocalories to maintain one's present weight can be calculated by multiplying the predicted BMR value by a factor that reflects the person's level of activity. +# Input data that includes height, weight and age of a person (male/female) +dataset45=c(175,90,25) + +#BMR of the person can be found using +BMR(dataset45) + +#The body mass index (BMI) is a measurement based on a person's mass (weight) and height. The BMI is calculated by dividing the body weight by the square of the height, and it is expressed in kilogrammes per square metre (kg/m2) since weight is measured in kilogrammes and height is measured in metres. The function was created using formula given by Keys et al. (1972). + +#BMR calculation +#Input data that includes height and weight of a person +dataset44=c(175,90) + +#BMI of the person can be found using +BMI(dataset44) + +``` diff --git a/inst/doc/HealthCal.html b/inst/doc/HealthCal.html new file mode 100644 index 0000000..c49d2c7 --- /dev/null +++ b/inst/doc/HealthCal.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + +HealthCal + + + + + + + + + + + + + + + + + + + + + + + + + + +

HealthCal

+ + + +
+

Introduction

+

****
The HealthCal R package is designed to find out +different parameters like basal metabolic rate, body mass index etc. +related to fitness and health of a person. This package shows the values +of the parameters with the present health status (healthy or not) +according the WHO prescribed norms.

+

****

+
#Example how the package works
+library(HealthCal)
+
+#BFP calculation
+
+# The body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat.
+
+#Input data that includes height, weight and age of a female
+dataset47=c(175,90,25)
+
+#The body fat percentage (BFP) of female can be found using
+BFPF(dataset47)
+#> [1] " The Body Fat Percentage (BFP) is 35.62 % and You are Obese catagory."
+
+#Input data that includes height, weight and age of a male
+dataset46=c(175,90,25)
+
+##The body fat percentage (BFP) of male can be found using
+BFPF(dataset47)
+#> [1] " The Body Fat Percentage (BFP) is 35.62 % and You are Obese catagory."
+
+#BMR calculation
+#Basal metabolic rate (BMR) is the rate of energy expenditure per unit time by endothermic animals at rest. The basal metabolic rate (BMR) of a person can be calculated using the Harris-Benedict equation, also known as the Harris-Benedict principle (1918). The function was created using this Harris-Benedict principle.The amount that should be consumed each day in kilocalories to maintain one's present weight can be calculated by multiplying the predicted BMR value by a factor that reflects the person's level of activity.
+# Input data that includes height, weight and age of a person (male/female)
+dataset45=c(175,90,25)
+
+#BMR of the person can be found using
+BMR(dataset45)
+#> [1] " The Basal Metabolic Rate (BMR) for Male is 1873.75 calories/day.  and  for female is 1807.75 calories/day. "
+
+#The body mass index (BMI) is a measurement based on a person's mass (weight) and height. The BMI is calculated by dividing the body weight by the square of the height, and it is expressed in kilogrammes per square metre (kg/m2) since weight is measured in kilogrammes and height is measured in metres. The function was created using formula given by Keys et al. (1972).
+
+#BMR calculation
+#Input data that includes height and weight of a person
+dataset44=c(175,90)
+
+#BMI of the person can be found using
+BMI(dataset44)
+#> [1] "The Body Mass Index (BMI) is  29.39 kg/m^2 and You are overweight."
+
+ + + + + + + + + + + diff --git a/man/BFPF.Rd b/man/BFPF.Rd index 3ac51d3..ed8e6bc 100644 --- a/man/BFPF.Rd +++ b/man/BFPF.Rd @@ -15,7 +15,7 @@ Input data that includes height, weight and age of a female } } \details{ -BThe body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat. Essential body fat is necessary to maintain life and reproductive functions. The equation for BFP calculation was developed at the Naval Health Research Center (NHRC), in San Diego, California. The function was created using this equation. The body fat percentage is a measure of fitness level, since it is the only body measurement which directly calculates a person's relative body composition without regard to height or weight.The percentage of essential body fat for women is greater than that for men, due to the demands of childbearing and other hormonal functions. +The body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat. Essential body fat is necessary to maintain life and reproductive functions. The equation for BFP calculation was developed at the Naval Health Research Center (NHRC), in San Diego, California. The function was created using this equation. The body fat percentage is a measure of fitness level, since it is the only body measurement which directly calculates a person's relative body composition without regard to height or weight.The percentage of essential body fat for women is greater than that for men, due to the demands of childbearing and other hormonal functions. } \value{ It returns body fat percentage (BFP) for female with present catagory} diff --git a/man/BMR.Rd b/man/BMR.Rd index 0fc547d..0da7f68 100644 --- a/man/BMR.Rd +++ b/man/BMR.Rd @@ -31,7 +31,7 @@ BMR, HealthCal } \examples{ dataset45=c(175,90,25) -BMI(dataset45) +BMR(dataset45) } \keyword{BMR} \keyword{HealthCal} diff --git a/vignettes/HealthCal.Rmd b/vignettes/HealthCal.Rmd new file mode 100644 index 0000000..5b49dc9 --- /dev/null +++ b/vignettes/HealthCal.Rmd @@ -0,0 +1,58 @@ +--- +title: "HealthCal" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{HealthCal} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` +## Introduction + +\*\*\*\*
*The HealthCal R package is designed to find out different parameters like basal metabolic rate, body mass index etc. related to fitness and health of a person. This package shows the values of the parameters with the present health status (healthy or not) according the WHO prescribed norms.* + +\*\*\*\*
+```{r setup} +#Example how the package works +library(HealthCal) + +#BFP calculation + +# The body fat percentage (BFP) of a human or other living being is the total mass of fat divided by total body mass, multiplied by 100; body fat includes essential body fat and storage body fat. + +#Input data that includes height, weight and age of a female +dataset47=c(175,90,25) + +#The body fat percentage (BFP) of female can be found using +BFPF(dataset47) + +#Input data that includes height, weight and age of a male +dataset46=c(175,90,25) + +##The body fat percentage (BFP) of male can be found using +BFPF(dataset47) + +#BMR calculation +#Basal metabolic rate (BMR) is the rate of energy expenditure per unit time by endothermic animals at rest. The basal metabolic rate (BMR) of a person can be calculated using the Harris-Benedict equation, also known as the Harris-Benedict principle (1918). The function was created using this Harris-Benedict principle.The amount that should be consumed each day in kilocalories to maintain one's present weight can be calculated by multiplying the predicted BMR value by a factor that reflects the person's level of activity. +# Input data that includes height, weight and age of a person (male/female) +dataset45=c(175,90,25) + +#BMR of the person can be found using +BMR(dataset45) + +#The body mass index (BMI) is a measurement based on a person's mass (weight) and height. The BMI is calculated by dividing the body weight by the square of the height, and it is expressed in kilogrammes per square metre (kg/m2) since weight is measured in kilogrammes and height is measured in metres. The function was created using formula given by Keys et al. (1972). + +#BMR calculation +#Input data that includes height and weight of a person +dataset44=c(175,90) + +#BMI of the person can be found using +BMI(dataset44) + +```