diff --git a/.Rbuildignore b/.Rbuildignore index 584fbb1..c204bd5 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,4 @@ ^codecov\.yml$ ^\.travis\.yml$ ^render_README\.R$ +^docs$ diff --git a/R/data.R b/R/data.R index 5fa48dd..428feee 100644 --- a/R/data.R +++ b/R/data.R @@ -3,7 +3,7 @@ #' Fake dataset used for examples. Loosely based on data provided by #' the National Center for Education Statistics, Common Core of Data, #' with information on U.S. primary schools in three U.S. states. -#' The original data can be downloaded free of charge at https://nces.ed.gov/ccd/. +#' The original data can be downloaded at \url{https://nces.ed.gov/ccd/}. #' #' @format A data frame with 8,142 rows and 5 variables: #' \describe{ @@ -20,7 +20,7 @@ #' Fake dataset used for examples. Loosely based on data provided by #' the National Center for Education Statistics, Common Core of Data, #' with information on U.S. primary schools in three U.S. states. -#' The original data can be downloaded free of charge at https://nces.ed.gov/ccd/. +#' The original data can be downloaded at \url{https://nces.ed.gov/ccd/}. #' #' @format A data frame with 8,013 rows and 5 variables: #' \describe{ diff --git a/R/segregation.R b/R/segregation.R index ee083dd..4f8f9c1 100644 --- a/R/segregation.R +++ b/R/segregation.R @@ -5,22 +5,7 @@ #' Provides tools to decompose the measures by groups and units, and by within #' and between terms. Includes standard error estimation by bootstrapping. #' -#' @section Methods: -#' -#' \itemize{ -#' \item{}{\code{\link{mutual_total}} Computes M and H.} -#' \item{}{\code{\link{mutual_within}} Computes detailed within-category segregation.} -#' \item{}{\code{\link{mutual_local}} Computes local segregation based on M.} -#' \item{}{\code{\link{mutual_difference}} Decomposes difference between two M indices.} -#' \item{}{\code{\link{entropy}} Calculates the entropy of a distribution.} -#' \item{}{\code{\link{ipf}} Uses iterative proportional fitting to adjust -#' the marginal distributions in one dataset to those of another dataset.} -#' } -#' @section Data: -#' -#' \itemize{ -#' \item{}{\code{\link{schools00}} and \code{\link{schools05}} Example datasets.} -#' } +#' @seealso \url{https://elbersb.de/segregation} #' #' @docType package #' @name segregation diff --git a/README.Rmd b/README.Rmd index a24627e..8f1f7b0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -79,6 +79,8 @@ mutual_difference(schools00, schools05, group = "race", unit = "school", weight = "n", method = "ipf") ``` +Find more information in the [documentation](https://elbersb.de/segregation). + ## How to install To install the package from CRAN, use @@ -93,12 +95,6 @@ To install the development version, use devtools::install_github("elbersb/segregation") ``` -To access the documentation ([PDF](https://cran.r-project.org/web/packages/segregation/segregation.pdf)), type - -```{r eval=FALSE} -?segregation -``` - ## Papers using the Mutual information index (list incomplete) diff --git a/README.md b/README.md index 836471c..846f6c9 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,9 @@ mutual_difference(schools00, schools05, group = "race", unit = "school", #> structural 0.00318 ``` +Find more information in the +[documentation](https://elbersb.de/segregation). + ## How to install To install the package from CRAN, use @@ -121,14 +124,6 @@ To install the development version, use devtools::install_github("elbersb/segregation") ``` -To access the documentation -([PDF](https://cran.r-project.org/web/packages/segregation/segregation.pdf)), -type - -``` r -?segregation -``` - ## Papers using the Mutual information index (list incomplete) diff --git a/docs/index.html b/docs/index.html index c5013fb..cdf6aac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -148,6 +148,7 @@

#> group_marginal group_marginal 0.01723 #> interaction interaction 0.00245 #> structural structural 0.00318 +

Find more information in the documentation.

@@ -156,8 +157,6 @@

To install the development version, use

devtools::install_github("elbersb/segregation") 
-

To access the documentation (PDF), type

-

diff --git a/docs/reference/schools00.html b/docs/reference/schools00.html index 0c6660f..7b390e4 100644 --- a/docs/reference/schools00.html +++ b/docs/reference/schools00.html @@ -35,7 +35,7 @@ +The original data can be downloaded at https://nces.ed.gov/ccd/." /> @@ -113,7 +113,7 @@

Ethnic/racial composition of schools for 2000/2001

Fake dataset used for examples. Loosely based on data provided by the National Center for Education Statistics, Common Core of Data, with information on U.S. primary schools in three U.S. states. -The original data can be downloaded free of charge at https://nces.ed.gov/ccd/.

+The original data can be downloaded at https://nces.ed.gov/ccd/.

diff --git a/docs/reference/schools05.html b/docs/reference/schools05.html index ee8b45c..702d1b2 100644 --- a/docs/reference/schools05.html +++ b/docs/reference/schools05.html @@ -35,7 +35,7 @@ +The original data can be downloaded at https://nces.ed.gov/ccd/." /> @@ -113,7 +113,7 @@

Ethnic/racial composition of schools for 2005/2006

Fake dataset used for examples. Loosely based on data provided by the National Center for Education Statistics, Common Core of Data, with information on U.S. primary schools in three U.S. states. -The original data can be downloaded free of charge at https://nces.ed.gov/ccd/.

+The original data can be downloaded at https://nces.ed.gov/ccd/.

diff --git a/docs/reference/segregation.html b/docs/reference/segregation.html index 7359e5a..2a31716 100644 --- a/docs/reference/segregation.html +++ b/docs/reference/segregation.html @@ -118,25 +118,9 @@

segregation: Entropy-based segregation indices

-

Methods

+

See also

- - - -

Data

- - - +

https://elbersb.de/segregation

@@ -144,9 +128,7 @@

Data

Contents

diff --git a/man/schools00.Rd b/man/schools00.Rd index 966a7d6..f3d8af7 100644 --- a/man/schools00.Rd +++ b/man/schools00.Rd @@ -19,6 +19,6 @@ schools00 Fake dataset used for examples. Loosely based on data provided by the National Center for Education Statistics, Common Core of Data, with information on U.S. primary schools in three U.S. states. -The original data can be downloaded free of charge at https://nces.ed.gov/ccd/. +The original data can be downloaded at \url{https://nces.ed.gov/ccd/}. } \keyword{datasets} diff --git a/man/schools05.Rd b/man/schools05.Rd index 16df871..f72d858 100644 --- a/man/schools05.Rd +++ b/man/schools05.Rd @@ -19,6 +19,6 @@ schools05 Fake dataset used for examples. Loosely based on data provided by the National Center for Education Statistics, Common Core of Data, with information on U.S. primary schools in three U.S. states. -The original data can be downloaded free of charge at https://nces.ed.gov/ccd/. +The original data can be downloaded at \url{https://nces.ed.gov/ccd/}. } \keyword{datasets} diff --git a/man/segregation.Rd b/man/segregation.Rd index 725ff82..570b6be 100644 --- a/man/segregation.Rd +++ b/man/segregation.Rd @@ -11,25 +11,6 @@ on the Mutual Information Index (M) and Theil's Information Index (H). Provides tools to decompose the measures by groups and units, and by within and between terms. Includes standard error estimation by bootstrapping. } -\section{Methods}{ - - -\itemize{ - \item{}{\code{\link{mutual_total}} Computes M and H.} - \item{}{\code{\link{mutual_within}} Computes detailed within-category segregation.} - \item{}{\code{\link{mutual_local}} Computes local segregation based on M.} - \item{}{\code{\link{mutual_difference}} Decomposes difference between two M indices.} - \item{}{\code{\link{entropy}} Calculates the entropy of a distribution.} - \item{}{\code{\link{ipf}} Uses iterative proportional fitting to adjust - the marginal distributions in one dataset to those of another dataset.} +\seealso{ +\url{https://elbersb.de/segregation} } -} - -\section{Data}{ - - -\itemize{ - \item{}{\code{\link{schools00}} and \code{\link{schools05}} Example datasets.} -} -} - diff --git a/render_README.R b/render_README.R index 62d5a32..fc85039 100644 --- a/render_README.R +++ b/render_README.R @@ -8,4 +8,3 @@ rmarkdown::render("README.Rmd", html_preview = FALSE)) pkgdown::build_site() -