knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
To install, run the following code:
devtools::install_github("sunniraleigh/schoolR")
library(schoolR) library(dplyr)
For a more detailed guide about what functions do and examples about how to use them, see the vignette.
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.
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)
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)
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_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()
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.frame
s. 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")
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)
Natalia Iannucci, Isabel Gomez, Sunni Raleigh
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.