Skip to content

Commit

Permalink
version 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
conig authored and cran-robot committed Jun 26, 2018
1 parent ebcc99d commit 37aba95
Show file tree
Hide file tree
Showing 9 changed files with 292 additions and 139 deletions.
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Package: Conigrave
Type: Package
Title: Flexible Tools for Multiple Imputation
Version: 0.1.1
Date: 2017-03-05
Version: 0.3.0
Date: 2018-06-26
Author: James Conigrave
Maintainer: James Conigrave <james.conigrave@gmail.com>
Description: Provides a set of tools that can be used across 'data.frame' and
'imputationList' objects.
License: GPL-3
LazyData: TRUE
Imports: ggplot2 (>= 2.1.0), mitools (>= 2.3), miceadds (>= 1.8-0)
Imports: ggplot2 (>= 2.1.0), mitools (>= 2.3), miceadds (>= 1.8-0),
magrittr (>= 1.5), stringdist(>= 0.9.4.7)
RoxygenNote: 6.0.1
NeedsCompilation: no
Packaged: 2017-03-13 03:40:03 UTC; s00183509
Packaged: 2018-06-26 07:37:14 UTC; jcon4884
Repository: CRAN
Date/Publication: 2017-03-13 06:52:54
Date/Publication: 2018-06-26 07:52:52 UTC
14 changes: 8 additions & 6 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
68310b10856cab72d05d93c396a10555 *DESCRIPTION
586163350489955f3267bdd031c8be0c *NAMESPACE
59b24acfef4abd459869b8790e51f859 *R/Interaction.plot.R
758d6a8c57ad0fe916a2d1a6e1fb857c *R/correlatrix.R
b207704dea49e64605a1b1a3a8545aa0 *man/correlatrix.Rd
703a82e2b8b328a852fdab381738ecbc *man/int.plot.Rd
e9b6d1d1fae61b48f7565f6488bf18a4 *DESCRIPTION
bf781ab3cd8e99ba036842ea1dfcc346 *NAMESPACE
e74730650947d9bb7e6d8e4c66c3cce7 *R/Interaction.plot.R
f6fa5cfcda0ff9d94827d6cbc6f6a500 *R/correlatrix.R
6e90bbf05fc95d47a070a3125148b9c1 *R/get.numeric.R
215eff655400c05b30133d48d026ca5f *man/correlatrix.Rd
a8c00647ed8844f55db210c1ccfe3a04 *man/get.numeric.Rd
8d3d6cd9407ece4c0cb9e85e6451efdd *man/int.plot.Rd
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Generated by roxygen2: do not edit by hand

export(correlatrix)
export(get.numeric)
export(int.plot)
import(ggplot2)
importFrom(magrittr,"%>%")
importFrom(miceadds,micombine.cor)
importFrom(mitools,MIcombine)
importFrom(mitools,imputationList)
importFrom(stats,cor.test)
importFrom(stats,lm)
importFrom(stats,na.omit)
importFrom(stringdist,stringdist)
12 changes: 8 additions & 4 deletions R/Interaction.plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,31 @@
#' @param colour a character string containing the colour of the data points
#' @param show.points logical to determine whether or not to include points
#' @param save logical as to whether or not to save the plot
#' @param path string containing path of where to save plot
#' @param path string containing path of where to save plot. Defaults to working directory.

#' @examples carsdata<-mtcars
#' int.plot(carsdata,"mpg","disp","cyl", y.lim = c(-2.5,2.5))
#' int.plot(carsdata,"mpg","disp", c("cyl","am"), y.lim = c(-5.0,2.0))
#' @export
#' @import ggplot2
#' @importFrom mitools MIcombine
#' @importFrom mitools MIcombine imputationList
#' @importFrom stats cor.test lm na.omit
#' @return An interaction plot

################################################################################
int.plot <- function(data, outcome, predictor, moderator, y.lim = c(-1,1),
x.lim=c(-1,1), x.lab = "auto", y.lab = "auto",title = "auto",
title.size = 15, SDs = 1,legend.name = "auto", colour = "ghostwhite",
show.points = FALSE, save = F, path = "default" ){
show.points = FALSE, save = F, path = getwd() ){
################################################################################

###############
###INTERACTION SUMMARIES
###2 way interaction
if(class(data) == "amelia"){
data = imputationList(data$imputations)
}

if(length(moderator) == 1){
#### standard data
if("data.frame" %in% class(data) == T ){
Expand Down Expand Up @@ -255,7 +259,7 @@ temp.plot<-ggplot(int.data, aes(x = scale(predictor), y = scale(outcome),

if(save == T){
save<- paste(outcome,"~",predictor,"x",moderator[1],".jpg", sep ="")
if(path == "default"){
if(path == "desktop"){
username<-Sys.getenv("USERNAME")
path <- paste("C:/Users/",username,"/Desktop/",sep = "")
}
Expand Down

0 comments on commit 37aba95

Please sign in to comment.