This tutorial describes how to access functionality in the bmi510final
R Package. Please note that this work is a submission for the BMI-510 Coursework at Emory University taught by Prof. J Lucas McKay.
-
Open
R
in your terminal (CMD/Gitbash). -
Download and install the package repository:
library(devtools) install_github("https://github.com/swati-rajwal/bmi510final")
or
devtools::install_github("https://github.com/swati-rajwal/bmi510final")
- Go to the
inst/
folder and it contains theTesting_package.r
file with examples. - Alternatively, once you install the package on your system, you can run
help(package = bmi510final)
and follow this short GIF to run sample examples for any function provided by this package:
running.a.sample.example.mp4
One of the functions requires you to have REDCAP_API_TOKEN
. Please follow these steps:
- Close R sessions if already open.
- Create a .Renviron file in your home directory (i.e., inside the 'bmi510final' folder)
- Inside the .Renviron file, define the following environment variable:
REDCAP_API_TOKEN
=<your_api_token_here> - Start your R session and now the R session should be able to load the new environment variables.
- Run the code.
This package provides a suite of tools designed to facilitate common tasks in biomedical informatics research. It includes functions for analyzing Bernoulli distributions
, computing survival curves
, unscaling standardized data
, approximating principal components
, standardizing variable names
in datasets, determining minimum sample sizes for statistical tests
, and securely fetching data from RedCap
.
The primary goal is to create reliable, reusable code that enhances productivity and ensures consistency across data analyses. All functions are well-documented and accessible for easy integration into research workflows.
-
Open
Terminal
oriTerm2
. -
Download the repository:
git clone https://github.com/swati-rajwal/bmi510final
cd bmi510final
-
Make changes in the code as you wish
-
Then run
r
either in cmd or git bash or RStudiolibrary(devtools) library(roxygen2) document() install()
or
library(bmi510final) help(package="bmi510final") devtools::document() devtools::install() devtools::check()
Please make sure your system has https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html installed on your local computer while for
check()
function -
Push up changes
git status
git add .
git commit –m "added minimumN()"
git push