Skip to content

Commit

Permalink
Renames the package to IMPosterior
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Martinez committed Nov 22, 2017
1 parent 48e94fa commit 224e58b
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: IMposterior
Package: IMPosterior
Title: Plot the posterior distribution
Version: 0.5
Authors@R: c(
Expand Down
6 changes: 3 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(IMposterior)
export(IMposteriorOutput)
export(renderIMposterior)
export(IMPosterior)
export(IMPosteriorOutput)
export(renderIMPosterior)
import(htmlwidgets)
importFrom(magrittr,"%>%")
24 changes: 12 additions & 12 deletions R/IMposterior.R → R/IMPosterior.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @importFrom magrittr "%>%"
#'
#' @export
IMposterior <- function(x, MME = 0, threshold = 0.75, colors,
IMPosterior <- function(x, MME = 0, threshold = 0.75, colors,
width = NULL, height = NULL,
elementId = NULL) {
# Set colors
Expand Down Expand Up @@ -71,39 +71,39 @@ IMposterior <- function(x, MME = 0, threshold = 0.75, colors,

# create widget
htmlwidgets::createWidget(
name = 'IMposterior',
name = 'IMPosterior',
opts,
width = width,
height = height,
package = 'IMposterior',
package = 'IMPosterior',
elementId = elementId
)
}

#' Shiny bindings for IMposterior
#' Shiny bindings for IMPosterior
#'
#' Output and render functions for using IMposterior within Shiny
#' Output and render functions for using IMPosterior within Shiny
#' applications and interactive Rmd documents.
#'
#' @param outputId output variable to read from
#' @param width,height Must be a valid CSS unit (like \code{'100\%'},
#' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a
#' string and have \code{'px'} appended.
#' @param expr An expression that generates a IMposterior
#' @param expr An expression that generates a IMPosterior
#' @param env The environment in which to evaluate \code{expr}.
#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
#' is useful if you want to save an expression in a variable.
#'
#' @name IMposterior-shiny
#' @name IMPosterior-shiny
#'
#' @export
IMposteriorOutput <- function(outputId, width = '100%', height = '400px'){
htmlwidgets::shinyWidgetOutput(outputId, 'IMposterior', width, height, package = 'IMposterior')
IMPosteriorOutput <- function(outputId, width = '100%', height = '400px'){
htmlwidgets::shinyWidgetOutput(outputId, 'IMPosterior', width, height, package = 'IMPosterior')
}

#' @rdname IMposterior-shiny
#' @rdname IMPosterior-shiny
#' @export
renderIMposterior <- function(expr, env = parent.frame(), quoted = FALSE) {
renderIMPosterior <- function(expr, env = parent.frame(), quoted = FALSE) {
if (!quoted) { expr <- substitute(expr) } # force quoted
htmlwidgets::shinyRenderWidget(expr, IMposteriorOutput, env, quoted = TRUE)
htmlwidgets::shinyRenderWidget(expr, IMPosteriorOutput, env, quoted = TRUE)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
HTMLWidgets.widget({

name: 'IMposterior',
name: 'IMPosterior',

type: 'output',

Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions man/IMposterior-shiny.Rd → man/IMPosterior-shiny.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions man/IMPosterior.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions man/IMposterior.Rd

This file was deleted.

4 changes: 2 additions & 2 deletions tests/example.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ x <- rnorm(1000)


# Usy my widget -----------------------------------------------------------
library(IMposterior)
IMposterior(x= x, MME=1)
library(IMPosterior)
IMPosterior(x= x, MME=1)



0 comments on commit 224e58b

Please sign in to comment.