Skip to content

Commit

Permalink
CHANGE NAME TO NANIAR, AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney committed Jul 25, 2017
1 parent becfc8b commit c8040a9
Show file tree
Hide file tree
Showing 181 changed files with 5,107 additions and 840 deletions.
16 changes: 8 additions & 8 deletions DESCRIPTION
@@ -1,17 +1,17 @@
Package: narnia
Package: naniar
Type: Package
Title: Data Structures, Summaries, and Visualisations for Missing Data
Version: 0.0.9.9300
Version: 0.0.9.9400
Author: Nicholas Tierney, Miles McBain, Di Cook,
Authors@R: c(
person("Nicholas", "Tierney", , "nicholas.tierney@gmail.com", c("aut", "cre")),
person("Di", "Cook", , "dicook@monash.edu", role = "aut"),
person("Miles", "McBain", , "miles.mcbain@gmail.com", role = "aut")
)
Description: Missing values are ubiquitous in data and need to be explored and
handled in the initial stages of analysis. 'narnia' provides helpers for
handled in the initial stages of analysis. 'naniar' provides helpers for
exploring missing data dependencies with minimal deviation from the common
workflow of 'ggplot2' and tidy data. 'narnia' builds data structures and
workflow of 'ggplot2' and tidy data. 'naniar' builds data structures and
functions that facilitate plotting of missing values and examination of
imputations.
License: MIT + file LICENSE
Expand Down Expand Up @@ -53,8 +53,8 @@ Collate:
'data-riskfactors.R'
'legend-draw.R'
'geom-missing-point.R'
'narnia-ggproto.R'
'narnia-package.R'
'naniar-ggproto.R'
'naniar-package.R'
'plotting.R'
'replace_to_na.R'
'shadow-shifters.R'
Expand All @@ -66,5 +66,5 @@ Collate:
'tidy-miss-label.R'
'tidy-miss-scalars.R'
'utils.R'
URL: https://github.com/njtierney/narnia
BugReports: https://github.com/njtierney/narnia/issues
URL: https://github.com/njtierney/naniar
BugReports: https://github.com/njtierney/naniar/issues
4 changes: 2 additions & 2 deletions NEWS.md
@@ -1,4 +1,4 @@
# narnia 0.0.9.4000 (2017/07/24)
# narnia 0.0.9.9400 (2017/07/24)

## new features

Expand All @@ -7,7 +7,7 @@ value from a variable to NA.

## breaking changes

- changed `geom_missing_point()` to `geom_miss_point()`.
- changed `geom_missing_point()` to `geom_miss_point()`, to keep consistent with the rest of the functions in `naniar`.

# narnia 0.0.9.9201 (2017/07/12)

Expand Down
2 changes: 1 addition & 1 deletion R/geom-missing-point.R
Expand Up @@ -87,7 +87,7 @@

}

#' @rdname narnia-ggproto
#' @rdname naniar-ggproto
#' @format NULL
#' @usage NULL
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/legend-draw.R
@@ -1,7 +1,7 @@
#' Key drawing functions
#'
#' Each Geom has an associated function that draws the key when the geom needs
#' to be displayed in a legend. These are the options built into narnia.
#' to be displayed in a legend. These are the options built into naniar.
#'
#' @return A grid grob.
#' @param data A single row data frame containing the scaled aesthetics to
Expand Down
6 changes: 6 additions & 0 deletions R/naniar-ggproto.R
@@ -0,0 +1,6 @@
#' @name naniar-ggproto
#' @title naniar-ggroto
#'
#' @description These are the stat and geom overrides using ggproto from ggplot2 that make naniar work.
#'
NULL
6 changes: 3 additions & 3 deletions R/narnia-package.R → R/naniar-package.R
@@ -1,10 +1,10 @@
#' narnia
#' naniar
#'
#' narnia is a package to make it easier to summarise and handle missing values
#' naniar is a package to make it easier to summarise and handle missing values
#' in R. It strives to do this in a way that is as consistent with tidyverse
#' principles as possible.
#'
#' @name narnia
#' @name naniar
#' @docType package
#' @import ggplot2
#' @import rlang
Expand Down
6 changes: 0 additions & 6 deletions R/narnia-ggproto.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/plotting.R
@@ -1,4 +1,4 @@
# plotting functions for narnia
# plotting functions for naniar


#' @importFrom visdat vis_miss
Expand Down
2 changes: 1 addition & 1 deletion R/shadow-shifters.R
Expand Up @@ -93,7 +93,7 @@ shadow_shift.character <- function(x, ...){
false = x)
}
#
# library(narnia)
# library(naniar)
#
# riskfactors %>%
# add_shadow_shift(vars = c("drink_average", "smoke_stop")) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/stat-missing-point.R
Expand Up @@ -64,7 +64,7 @@ stat_miss_point <- function(mapping = NULL,

}

#' @rdname narnia-ggproto
#' @rdname naniar-ggproto
#' @export
StatMissPoint <- ggproto("StatMissPoint", Stat,
required_aes = c("x", "y"),
Expand Down
4 changes: 2 additions & 2 deletions R/tidiers_time_series.R
Expand Up @@ -107,7 +107,7 @@ miss_var_run <- function(data, var){
true = "missing",
false = "complete"))
# also look into `label_na`
# narnia::is_na(TRUE)
# naniar::is_na(TRUE)

}

Expand Down Expand Up @@ -141,7 +141,7 @@ miss_var_run <- function(data, var){
# weekday) %>%
# # miss_ts_summary(time_index = Date_Time,
# # variable = Hourly_Counts
# # narnia:::add_period_counter(period_length = ) %>%
# # naniar:::add_period_counter(period_length = ) %>%
# # dplyr::group_by(period_counter) %>%
# dplyr::tally(is.na(Hourly_Counts))
# dplyr::rename(n_miss = n) %>%
Expand Down
8 changes: 5 additions & 3 deletions R/tidy-miss-family.R
Expand Up @@ -81,7 +81,7 @@ miss_case_pct <- function(data){
# which rows are complete?
stats::complete.cases() %>%
mean()

# Return 100 if temp is 1
# Prevent error when all the rows contain a NA and then mean is 1
# so (1 -1)*100 = 0, whereas function should return 100.
Expand Down Expand Up @@ -209,6 +209,7 @@ miss_var_table <- function(data){
#' Provide a data_frame containing the variable names, the number of missing values, in each variable, and the percent of missing values in each variable.
#'
#' @param data a dataframe
#' @param ... extra arguments
#'
#' @return a data_frame of the percent of missing data in each variable
#' @export
Expand All @@ -217,7 +218,8 @@ miss_var_table <- function(data){
#'
#' miss_var_summary(airquality)
#'
miss_var_summary <- function(data){
#' @export
miss_var_summary <- function(data, ...){

if(is.null(data)){
stop("Input must not be NULL", call. = FALSE)
Expand Down Expand Up @@ -269,7 +271,7 @@ miss_case_summary <- function(data){
} else stop("Input must inherit from data.frame", call. = FALSE)
}

#' Collate summary measures from narnia into one tibble
#' Collate summary measures from naniar into one tibble
#'
#' \code{summarise_missingness} performs all of the missing data helper summaries and puts them into a list. Perhaps in the future this can all be some sort of nested dataframe?
#'
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Expand Up @@ -16,7 +16,7 @@ magrittr::`%>%`
#'
#' @examples
#'
#' narnia:::where_na(airquality)
#' naniar:::where_na(airquality)
#'
where_na <- function(x){
which(is.na(x), arr.ind = TRUE)
Expand All @@ -36,14 +36,14 @@ where_na <- function(x){
#'
#' @examples
#'
#' narnia:::which_na(airquality)
#' naniar:::which_na(airquality)
#'
which_na <- function(x){
which(is.na(x))
}

# note:
# it would be cool for the missing data mechanisms if these were also treated as regular missing values in the other parts of narnia.
# it would be cool for the missing data mechanisms if these were also treated as regular missing values in the other parts of naniar.
# on that thought, they should just be regular missing values, but the addition of something like the `as_shadow` argument allows for them to be missing with specified structure.
# so, I guess what I'm saying is that there should be a way for the proposed missing mechanisms to be treated differently, if desired, otherwise, treated as regular missings, so they are treated the same by the rest of the R universe.

Expand Down
Binary file modified README-figs/README-bind-shadow-density-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-facet-add-theme-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-facet-by-month-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-geom-missing-point-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-geom-missing-point-alpha-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-unnamed-chunk-3-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README-figs/README-unnamed-chunk-3-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-unnamed-chunk-4-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README-figs/README-unnamed-chunk-5-1.png