Skip to content

stat545ubc-2021/lorenzolindoPackage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

summaryStats

This package contains a function called “summaryStats” that can be used to create a dataframe that contains summary statistics for a given dataset. The summary statistics that are calculated with this function include the mean, median, max, min, and sdev (standard deviation).

The function has two mandatory arguments. The first argument (dataset_of_interest) requires the user to input a dataframe. The second argument (col_of_interest) requires the user to input a numeric column in the dataset, that the user wishes to calculate summary statistics on.

The function also has an optional third argument, which is FALSE by default. If the user inputs TRUE, then this function will also export a csv file called “results.csv” which contains the results of the calculated summary statistics.

Installation

This package is not published on CRAN, so in order to use it, you need to download it from this repository. You can install summaryStats from GitHub using the following line of code:

# install.packages("devtools")
devtools::install_github("stat545ubc-2021/lorenzolindoPackage/summaryStats")
#> Skipping install of 'summaryStats' from a github remote, the SHA1 (3e94c845) has not changed since last install.
#>   Use `force = TRUE` to force installation

Example

This is a basic example which shows you how to solve a common problem:

suppressMessages({
  library(summaryStats)
  library(tidyverse)
  library(datateachr)
})
summaryStats(vancouver_trees, height_range_id)
#> # A tibble: 1 × 5
#>    mean median   max   min  sdev
#>   <dbl>  <dbl> <dbl> <dbl> <dbl>
#> 1  2.63      2    10     0  1.54

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages