Skip to content

Commit 71e9039

Browse files
committed
trying to get kable working again
1 parent 311bd2b commit 71e9039

File tree

8 files changed

+29
-31
lines changed

8 files changed

+29
-31
lines changed

DESCRIPTION

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@ URL: https://github.com/tbates/umx
1818
Description: Quickly create, run, and report structural equation and twin models.
1919
See '?umx' for help, and umx_open_CRAN_page("umx") for NEWS.
2020
Timothy C. Bates, Michael C. Neale, Hermine H. Maes, (2019). umx: A library for Structural Equation and Twin Modelling in R.
21-
Twin Research and Human Genetics, 22, 27-41. <doi:10.1017/thg.2019.2>.
21+
Twin Research and Human Genetics, 22, 27-41. DOI: \doi{10.1017/thg.2019.2}.
2222
Depends:
2323
R (>= 3.5.0),
2424
OpenMx (>= 2.11.5)
2525
Imports:
26+
ggplot2,
2627
cowplot,
2728
DiagrammeR,
2829
DiagrammeRsvg,
2930
rsvg,
30-
ggplot2,
31-
kableExtra,
32-
knitr,
3331
lavaan,
3432
MASS,
3533
Matrix,
@@ -42,7 +40,9 @@ Imports:
4240
RCurl,
4341
scales,
4442
utils,
45-
xtable
43+
xtable,
44+
knitr,
45+
kableExtra
4646
Suggests:
4747
cocor,
4848
devtools,

INSTALL

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@ See the umx and OpenMx home pages for more.
22

33
- (\url{https://github.com/tbates/umx})
44
- (\url{https://openmx.ssri.psu.edu})
5-
6-
Note: In addition to the version of OpenMx on CRAN, a version with
7-
NPSOL-enabled is available. To install it, once you have umx installed run
8-
9-
install.OpenMx("NPSOL")

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ importFrom(graphics,plot)
358358
importFrom(kableExtra,add_footnote)
359359
importFrom(kableExtra,column_spec)
360360
importFrom(kableExtra,footnote)
361+
importFrom(kableExtra,kable)
361362
importFrom(kableExtra,kable_classic)
362363
importFrom(kableExtra,kable_classic_2)
363364
importFrom(kableExtra,kable_material)

NEWS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## dev umx 4.9.0
2-
* NEW:
2+
* NEW: `umxACEv` works with nSib = 3
3+
* NEW: `umxACE` works with nSib = 3
4+
* IMPROVED: `umxAPA` more use of cat to print (easier to read and copy)
5+
* IMPROVED: `fin_interest` compute effective interest
6+
* FIXED: `tmx_show` works for M matrix
7+
* IMPROVED: `xmuTwinSuper_NoBinary` update for nSib>2
38

49
# Releases
510
## umx 4.8.0

R/build_run_modify.R

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,39 +74,30 @@
7474
#' @importFrom utils combn data flush.console read.table txtProgressBar
7575
#' @importFrom utils globalVariables write.table packageVersion
7676
#' @importFrom utils browseURL install.packages str read.csv
77-
7877
#' @importFrom cowplot draw_label plot_grid ggdraw
7978
#' @importFrom ggplot2 ggplot qplot ggtitle ylab xlab labs
8079
#' @importFrom ggplot2 scale_x_continuous scale_x_continuous theme
8180
#' @importFrom ggplot2 geom_point geom_segment geom_line geom_ribbon
8281
#' @importFrom ggplot2 element_text element_blank expand_limits aes
83-
#' @importFrom kableExtra kbl add_footnote column_spec footnote
84-
#' @importFrom kableExtra kable_classic kable_classic_2 kable_minimal kable_material kable_material_dark kable_paper
85-
86-
# # ' @importFrom knitr
8782

83+
# knitr and kableExtra used in printing tables
84+
# #' @importFrom knitr kable knit_print
85+
#' @importFrom kableExtra kable kbl add_footnote column_spec footnote
86+
#' @importFrom kableExtra kable_classic kable_classic_2 kable_minimal kable_material kable_material_dark kable_paper
8887
# Used in plot
8988
#' @importFrom DiagrammeR DiagrammeR
90-
9189
# Used in umx_make_TwinData
9290
#' @importFrom MASS mvrnorm
93-
9491
# Used in umxAPA
9592
#' @importFrom nlme intervals
96-
9793
# Used in umxHetCor
9894
#' @importFrom polycor hetcor
99-
10095
# Used in umxCompare
10196
#' @importFrom xtable xtable
102-
10397
# Used in umxWeightedAIC
10498
#' @importFrom MuMIn Weights
10599

106100

107-
# Not used?
108-
NULL
109-
110101
utils::globalVariables(c(
111102
'x',
112103
'xtable',
@@ -5054,7 +5045,9 @@ umxPath <- function(from = NULL, to = NULL, with = NULL, var = NULL, cov = NULL,
50545045
#' # umxSummary generates journal-ready fit information.
50555046
#' # We can choose std=T for standardized parameters and can also
50565047
#' # filter out some types of parameter (e.g. means or residuals)
5057-
#'
5048+
#'
5049+
#' knitr::kable(mtcars[1,1:2])
5050+
#'
50585051
#' umxSummary(m1, std = TRUE, residuals=FALSE)
50595052
#'
50605053
#' # parameters() flexibly retrieves model coefficients.

R/fit_and_reporting.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,7 @@ umxSummary.MxModel <- function(model, refModels = NULL, std = FALSE, digits = 2,
10091009
toShow = parameterTable[, namesToShow]
10101010
}
10111011
toShow = xmu_summary_RAM_group_parameters(model, toShow, means= means, residuals = residuals)
1012-
1013-
umx_print(toShow, digits = digits, report = report, caption = "Model Parameter loadings", na.print = "", zero.print = "0", justify = "none")
1012+
umx_print(toShow, digits = digits, report = report, caption = paste0("Parameter loadings for model ", omxQuotes(model$name)), na.print = "", zero.print = "0", justify = "none")
10141013
}
10151014
with(modelSummary, {
10161015
if(!is.finite(TLI)){
@@ -4049,7 +4048,7 @@ umx_aggregate <- function(formula = DV ~ condition, data = df, what = c("mean_sd
40494048
if(report == "html"){
40504049
umx_print(tmp, digits = digits, file = "tmp.html")
40514050
} else if(report == "markdown"){
4052-
return(knitr::kable(tmp))
4051+
return(kable(tmp))
40534052
}else{
40544053
# umx_print(tmp, digits = digits)
40554054
return(tmp)

R/misc_and_utility.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,7 +3966,7 @@ umx_print <- function (x, digits = getOption("digits"), caption = NULL, report =
39663966
print(x, quote = quote, right = TRUE, ...)
39673967
} else if(report == "html"){
39683968
# From report = "html"
3969-
if(both){ print(knitr::kable(x, caption= caption)) }
3969+
if(both){ print(kable(x, caption= caption)) }
39703970
if(kableExtra){
39713971
# default html output
39723972
x = kbl(x, caption = caption)
@@ -3982,8 +3982,11 @@ umx_print <- function (x, digits = getOption("digits"), caption = NULL, report =
39823982
system(paste0("open ", file))
39833983
}
39843984
}else{
3985-
print(knitr::kable(x, caption = caption))
3986-
# print(kbl(x, caption = caption, format = umx_set_table_format(silent=TRUE)))
3985+
# markdown/latex
3986+
# knit_print(kbl(x, caption = caption, format = umx_set_table_format(silent=TRUE)))
3987+
# print(kbl(x, caption = caption))
3988+
# return(kbl(x, caption = caption, format = umx_set_table_format(silent=TRUE) ))
3989+
print(kable(x, caption = caption))
39873990
}
39883991
invisible(x)
39893992
}

man/umx.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)