Skip to content

Commit

Permalink
Merge branch 'development' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinfife committed Nov 18, 2019
2 parents 7a54249 + 9876c43 commit f4f263b
Show file tree
Hide file tree
Showing 21 changed files with 1,886 additions and 262 deletions.
5 changes: 2 additions & 3 deletions .Rbuildignore
Expand Up @@ -13,6 +13,7 @@ jamovi
^\.Rproj\.user$
tests/figs/
README_files/
tests/
^doc$
^Meta$
EJ notes.rtf
Expand All @@ -22,6 +23,4 @@ R/glmbasic.b.R
R/glmbasic.h.R
R/modelcomp.b.R
R/modelcomp.h.R
vignettes/regex_syntax.txt
R/flexplot_jasp2.R
R/glinmod_jasp.R
vignettes/regex_syntax.txt
4 changes: 4 additions & 0 deletions NAMESPACE
Expand Up @@ -14,11 +14,15 @@ export(bf.bic)
export(compare.fits)
export(estimates)
export(flexplot)
export(flexplot_jasp2)
export(flip_data)
export(geom_jitterd)
export(glinmod)
export(glinmod_jasp)
export(linmod_jasp)
export(make.formula)
export(mixed.mod.visual)
export(mixedmod_jasp)
export(model.comparison)
export(position_jitterd)
export(position_jitterdodged)
Expand Down
38 changes: 19 additions & 19 deletions R/compare.fits.R
Expand Up @@ -96,25 +96,25 @@ compare.fits = function(formula, data, model1, model2=NULL, return.preds=F, repo



##### look for interactions and remove them
if (length(grep(":", terms.mod1))>0){
terms.mod1 = terms.mod1[-grep(":", terms.mod1)]
model1.type = ifelse(model1.type=="lm", "interaction", model1.type)
}
if (length(grep(":", terms.mod2))>0){
terms.mod2 = terms.mod2[-grep(":", terms.mod1)]
model2.type = ifelse(model2.type=="lm", "interaction", model2.type)
}

##### look for polynomials and remove them
if (length(grep("^2", terms.mod1, fixed=T, value=T))>0 ){
terms.mod1 = terms.mod1[-grep("^2", terms.mod1, fixed=T)]
model1.type = ifelse(model1.type=="lm", "polynomial", model1.type)
}
if (length(grep("^2", terms.mod2, fixed=T, value=T))>0 & model1.type=="lm"){
terms.mod2 = terms.mod2[-grep("^2", terms.mod1, fixed=T)]
model2.type = ifelse(model2.type=="lm", "polynomial", model2.type)
}
# ##### look for interactions and remove them
# if (length(grep(":", terms.mod1))>0){
# terms.mod1 = terms.mod1[-grep(":", terms.mod1)]
# model1.type = ifelse(model1.type=="lm", "interaction", model1.type)
# }
# if (length(grep(":", terms.mod2))>0){
# terms.mod2 = terms.mod2[-grep(":", terms.mod1)]
# model2.type = ifelse(model2.type=="lm", "interaction", model2.type)
# }
#
# ##### look for polynomials and remove them
# if (length(grep("^2", terms.mod1, fixed=T, value=T))>0 ){
# terms.mod1 = terms.mod1[-grep("^2", terms.mod1, fixed=T)]
# model1.type = ifelse(model1.type=="lm", "polynomial", model1.type)
# }
# if (length(grep("^2", terms.mod2, fixed=T, value=T))>0 & model1.type=="lm"){
# terms.mod2 = terms.mod2[-grep("^2", terms.mod1, fixed=T)]
# model2.type = ifelse(model2.type=="lm", "polynomial", model2.type)
# }



Expand Down
2 changes: 1 addition & 1 deletion R/flexplot_jasp2.R
Expand Up @@ -9,7 +9,7 @@
#'
#' @return a flexplot graphic.
#' @export
flexplot_jasp2 <- function(jaspResults, dataset, options) {
flexplot_jasp2 = function(jaspResults, dataset, options) {

### check if they've entered anything
#save(dataset, options, file="~/Documents/JaspResults.Rdat")
Expand Down

0 comments on commit f4f263b

Please sign in to comment.