knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

freqdistributionNogives

The goal of freqdistributionNogives is to automate the process of GROUPED FREQUENCY DISTRIBUTION data-framing and cumulative frequency graph.

Installation

You can install the development version of freqdistributionNogives like so: The Public Repository can be accessed in the following manner:-

# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
Development Package Link :- https://github.com/Harshit-Budakoti/packagetest
1)Install the package devtools in Rstudio.
install.packages(devtools)
2)Run the code given below to install the Development Version Repository using
##devtools::install_github('Harshit-Budakoti/packagetest')
3) After installation:-
use the function basicfreqdist(lowerclasslimits,upperclasslimits,frequencies)
The working of the packages has been illustrated using an example.

Example

This is a basic example which shows you how to use this package to get automated frequency distribution table with cumulative frequencies and cumulative frequency plot:

library(freqdistributionNogives)
lowerlimits=c(0,5,10,15,20,25)
upperlimits=c(5,10,15,20,25,30)
frequencies=c(124,153,234,531,91,414)
basicfreqdist(lowerlimits,upperlimits,frequencies)

## basic example code
The figure given below gives us the Histogram plot of the given data
```r
digits=floor(log10(max(frequencies))) + 1 #counts the number of digits in the maximum frequency
margin=10**(digits-1)
getmode <- function(v) {
   uniqv <- unique(v)
   uniqv[which.max(tabulate(match(v, uniqv)))]
}
v=diff(lowerlimits)
h=getmode(v)
spacesvector={}
places=seq(1,length(frequencies)-1)
for (m in places){spacesvector[m]<-(upperlimits[m]-lowerlimits[m+1])}
SPACES=(abs(c(0,spacesvector))/h)
barplot(frequencies,names.arg=paste(lowerlimits,upperlimits,sep='-'),space=SPACES,xlab='Class Intervals',ylab='Frequency',ylim=c(0,max(frequencies)+margin))


Harshit-Budakoti/freqdistributionNogives documentation built on Jan. 10, 2022, 12:33 a.m.