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

schoolR

Travis build status

An R package that provides a simple and accessible approach for elementary through high school students and their educators to engage in R and solidify their understanding of mathematical concepts.

Installation

To install, run the following code:

devtools::install_github("sunniraleigh/schoolR") 
library(schoolR)
library(dplyr)

Getting Started

For a more detailed guide about what functions do and examples about how to use them, see the vignette.

Usage

This package should be used in a classroom setting as a supplemental material for math courses, or as part of an R group dedicated to teaching younger students. It provides functions to help students develop a deeper understanding of how area is calculated, and how to analyze trends in graphs. This package also lets teachers produce practice problems, while specifying the operation, number of problems to generate, and magnitude of numbers involved. It will be used by teachers and students in collaboration. It will allow students to begin understanding more complex, big picture math concepts by using R without having to first learn all of the details of coding.

Drawing squares with square()

square allows the user to input a numeric vector that defines the length of each side of the square. The function will output a visualization of the square and a tibble with calculation of its length, width, area and perimeter

# input a single length 
square(3)

# input a vector
square(3:6)

Draw a circle with circle()

circle allows the user to input a desired radius length which returns the respective circle visualization along with calculations of its diameter, perimeter, and area.

# input a single length
circle(3)
# input a vector
circle(2:5)
# input a pre-defined vector
r <- c(4,7,9)
circle(r)

Create a tibble with ngon()

ngon allows the user to specify the length of a radius and the number of sides of a shape. This function can then passed onto map_ngon, which then produces a tibble that contains all of the calculations.

ngon(3,5) %>% map_ngon()

Draw an polygon with draw_ngon()

draw_ngon() builds upon the ngon and the map_ngon function by plotting the shape given the information for in ngon.

ngon(3,5) %>% map_ngon() %>% draw_ngon()

#input a vector
ngon(3:6,5) %>% map_ngon() %>% draw_ngon()

Graphing with graph_my_data()

graph_my_data allows students and teachers to produce high-quality graphs of data that they obtain, or of data from data.frames. It outputs basic simple linear regression diagnostics such as correlation coefficients, means, and medians, and interprets the r value. This allows for a deeper understanding of general trends in data for students who likely have very little statistical background.

x <- c(1, 3, 4, 6, 2)
y <- c(2, 7, 7, 11, 4)
graph_my_data(x, y, "blue", "number of students called in sick", "total number of absences", "kids out of school on a certain day")

Producing Practice Problems with generate_problems()

generate_problems allows educators to produce sets of practice questions for students based on what they would like them to work on. Teachers can specify the upper and lower bounds of the numbers being chosen from to use in the equation, what operation to use, and how many problems to produce.

generate_problems("multiply", 5, 15, 10)

Authors

Natalia Iannucci, Isabel Gomez, Sunni Raleigh



sunniraleigh/schoolR documentation built on Dec. 16, 2019, 12:48 a.m.