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

model.comp

Lifecycle: experimental CRAN status

The goal of model.comp is to compare the performance of some fitted models on the given data. (Note: currently, only supports returning the fitted values, and only supports a logistic regression model. This will be expanded on in the future.)

The package website can be found here: https://hantonita.github.io/model.comp/

Installation

This package is not on CRAN yet so the best way to install it is using the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("hantonita/model.comp")

Example

This is a basic example which shows you how to solve a common problem:

library(model.comp)
(compare_models(data = gapminder::gapminder, eqn = "lifeExp ~ gdpPercap", models = c('logreg')))

Code of Conduct

Please note that the model.comp project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.


Exercise 1.1:

To create this R package, the following steps were used:

library(devtools)
usethis::create_package('~Documents/model.comp')

to make an R package

library(devtools)
usethis::use_git()

to ensure that the project is using git. Then I created a repository on github with the same name, and used the shell opened from my R project to push the existing repository to github.

library(devtools)
usethis::use_r('compare')

to create the compare.R file to hold my compare function.

I then edited the DESCRIPTION file, adding a title and the author information, and using usethis::use_mit_license() to add a license to my package.

Package dependencies were added to the DESCRIPTION file using usethis::use_package(<package name>), and a vignette was created using usethis::use_vignette().

Documentation was finally updated using devtools::document()



hantonita/model.comp documentation built on Jan. 1, 2021, 3:15 a.m.