Code
install.packages("scdhlm")
library(scdhlm)
James E. Pustejovsky
October 19, 2014
UPDATED 10/2/2016 after posting the package to CRAN
Here are step-by-step instructions on how to download and install the scdhlm package for R. You’ll need to have a copy of R installed. There are two ways to do the installation: through the Comprehensive R Archive Network (CRAN) or from the source code on Github. I describe each approach in turn.
Go via CRAN to install the most recent stable version of the package. Type the following commands at the R prompt:
Go via Github to get the latest development version of the package. For this option, you will first need to install the devtools package:
Once you have successfully installed this package, type the following:
You’ll only need to do the installation once. Once you’ve got the package installed, type the following in order to access the package within an R session: library(scdhlm)
.
To open the package documentation, type package?scdhlm
. To access the documentation for an individual function in this package, just type ?
followed by the name of the function. For instance, one of the main functions in the package is called g_REML
; to access its documentation, type ?g_REML
.
The package includes an interactive app (written with shiny
) for calculating design-comparable standardized mean differences. To run this app on your computer, you will first need to install RStudio (if you don’t already have it). Then ensure that you have the shiny
, markdown
, and ggplot2
packages installed by running the following:
Finally, open the app by typing the following at the prompt within RStudio:
The app should now open in your web browser.
---
title: Getting started with scdhlm
date: '2014-10-19'
categories:
- single-case design
- design-comparable SMD
- Rstats
code-tools: true
---
**UPDATED 10/2/2016 after posting the package to CRAN**
Here are step-by-step instructions on how to download and install the scdhlm package for R. You'll need to have a [copy of R installed](https://cran.r-project.org/). There are two ways to do the installation: through the Comprehensive R Archive Network (CRAN) or from the source code on Github. I describe each approach in turn.
### Option 1: Via CRAN
Go via CRAN to install the most recent stable version of the package. Type the following commands at the R prompt:
```{r eval = FALSE}
install.packages("scdhlm")
library(scdhlm)
```
### Option 2: Via Github
Go via Github to get the latest development version of the package. For this option, you will first need to install the devtools package:
```{r, eval=FALSE}
install.packages("devtools")
```
Once you have successfully installed this package, type the following:
```{r, eval=FALSE}
library(devtools)
install_github("jepusto/scdhlm")
library(scdhlm)
```
### Further instructions
You'll only need to do the installation once. Once you've got the package installed, type the following in order to access the package within an R session: `library(scdhlm)`.
To open the package documentation, type `package?scdhlm`. To access the documentation for an individual function in this package, just type `?` followed by the name of the function. For instance, one of the main functions in the package is called `g_REML`; to access its documentation, type `?g_REML`.
### web-interface for calculating effect sizes
The package includes an interactive app (written with `shiny`) for calculating design-comparable standardized mean differences. To run this app on your computer, you will first need to [install RStudio](https://www.rstudio.com/products/rstudio/download/) (if you don't already have it). Then ensure that you have the `shiny`, `markdown`, and `ggplot2` packages installed by running the following:
```{r, eval=FALSE}
install.packages("shiny")
install.packages("markdown")
install.packages("ggplot2")
```
Finally, open the app by typing the following at the prompt within RStudio:
```{r, eval=FALSE}
library(scdhlm)
shine_scd()
```
The app should now open in your web browser.