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

Soomo R Analysis Package

Overview
Installation
Usage
Development

Overview

The Soomo R package is a suite of functions compiled to accomplish tasks I have regularly encountered and no longer wanted to do by hand. These include figure styling, compiling multiple documents into one, or frameworks for analysis from particular schools.

Installation

The R Soomo package relies on functions from the tidyverse to run. The easiest way to install these packages is:

install.packages("tidyverse")

Once you have the installed the tidyverse you will need to install another package to install the devtools package so that you can install the Soomo R package

install.packages("devtools")

Now you can install the soomo R package directly from GitHub using

library(devtools)
install_github("PatrickDuffy34/rsoomo")

Usage

The package name within R will simply be soomo so I will be using that notation from here on. Functions within soomo are a bit difficult to describe since they address specific problems I have faced. The best place to find documentation on usage is by typing ?function in the console. Each function will have documentation that specifically describes how it is used, and what is required for it to run.

Currently, there are two processes that are currently addressed within the soomo package. Combining multiple reports from the Admin space into one document, and adding a Soomo-style theme to visualizations. The previously developed tools for Short Answer Reports and Instructor Activity Reports will make their way into functions as well.

For the time being I will keep a list of all functions included below. You can learn more by typing ?function into the RStudio console, where function is the function name below. Currently, school-specific functions are named with the school first. For instance, the function to tidy SNHU data is snhu_tidy_assignments.

# The combine_analytics function is used to combine some number of analytics reports into one document
combine_analytics(prefix, weeks)

# The geom_bar_soomo takes a minimal theme and adds Soomo green bars to a ggplot2 object
geom_bar_soomo(...)

# compile_template_points takes a raw template report from the admin space and returns a template points summary
compile_template_points(filename)

# write_template_points provides a pipeable wrapper to write.csv() to intuitively create the template points file
write_template_points()

# snhu_join_data provides a wrapper to dplyr::left_join that will combine SNHU and Soomo data
snhu_join_data(soomo_data, snhu_data)

# snhu_add_soomo_id uses a prenamed lookup table to add soomo_id to SNHU data using USER_PK1 values
snhu_add_soomo_id(snhu_assignments = NULL, file_name = "user_pk1_to_soomo_id.csv", pk1_name = "USER_PK1", soomo_name = "soomo_id")

# snhu_tidy_assignments takes the standard formatted data from SNHU and transforms from long to wide format and adds a total_points field
snhu_tidy_assignments(file_name, course = "SCI-200", term = "17EW4")

Development

I will keep a running list of improvements and bugs here. If you have any requests, or if you think you find a bug feel free to create an issue, or just tell me directly.



plduffy/rsoomo documentation built on May 26, 2019, 12:32 a.m.