This package contains the following functions: draw_a_name, draw_names, multi_excel, my_csv_reader, and save_as_csv. Further description on each function can be found below.

This package also includes two datasets: 'mydata' which contains the iris dataset and 'prenoms' containing the history of first names in France.

Load package by running:

library("megahhomework")

Functions

draw_a_name

Plots a graph showing the popularity of a given prenom and gender across different years.

draw_a_name("Dana", "F")

draw_names

Plots a graph showing the popularity of a given set of prenoms across different years.

draw_names(c("Dana", "Daniel", "Maria"))

multi_excel

Reads all the sheets in a given excel file and returns a list.

library(tibble)
output <- multi_excel("~/Downloads/exceltest.xlsx")
glimpse(output)

my_csv_reader

Reads all the CSV files in a given directory into a list.

library(tibble)
output <- my_csv_reader("~/Downloads/X_2017/Jour 1/data")
glimpse(output)

save_as_csv

Write a data frame into a CSV file.

Example: save_as_csv(mydata,"../../iris.csv")

Datasets

mydata

Contains the iris dataset.

library(tibble)
glimpse(mydata)

prenoms

Contains data about first names in France throughout the years

library(tibble)
glimpse(prenoms)


megahf/megahhomework documentation built on May 29, 2019, 4:42 a.m.