Description Usage Arguments Details Author(s) References See Also Examples
Function for exporting MA output to nicely formatted Word tables.
1 |
object |
Will take either an |
get |
Start up the Word program? TRUE if an instance of Word is not currently open. |
new |
Output data into a new Word document? TRUE or FALSE. |
... |
Additional arguments to be passed to R2wd functions. |
This function depends of the R2wd
package. See Christian Ritter (2010). R2wd: Write MS-Word documents from R. R
package version 1.3 for the details of the R2wd
package.
AC Del Re & William T. Hoyt
Maintainer: AC Del Re acdelre@gmail.com
Christian Ritter (2010). R2wd: Write MS-Word documents from R. R package version 1.3.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Sample data
id<-c(1:20)
n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
r<-c(.68,.56,.23,.64,.49,-.04,.49,.33,.58,.18,-.11,.27,.26,.40,.49,
.51,.40,.34,.42,.16)
mod1<-c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1)
dat<-data.frame(id,n,r,mod1)
dat$var.r <- var_r(dat$r, dat$n) # MAc function to derive variance
dat$z <- r_to_z(dat$r) # MAc function to convert to Fisher's z (z')
dat$var.z <- var_z(dat$n) # MAc function for variance of z'
dat$mods2 <- factor(rep(1:2, 10))
dat
# Examples
# install R2wd
# install.packages('R2wd', dependencies = TRUE)
# mareg fuction
temp <- mareg(r~ mod1 + mods2, var = var.r, method = "REML", data = dat)
# Export data to Word in formatted table
## Not run: wd(temp, get = TRUE, new = TRUE)
|
id n r mod1 var.r z var.z mods2
1 1 10 0.68 1 0.03211264 0.82911404 0.142857143 1
2 2 20 0.56 2 0.02479710 0.63283319 0.058823529 2
3 3 13 0.23 3 0.07474987 0.23418947 0.100000000 1
4 4 22 0.64 4 0.01659867 0.75817374 0.052631579 2
5 5 28 0.49 1 0.02138696 0.53606034 0.040000000 1
6 6 12 -0.04 2 0.09061841 -0.04002135 0.111111111 2
7 7 12 0.49 8 0.05249527 0.53606034 0.111111111 1
8 8 36 0.33 7 0.02268741 0.34282825 0.030303030 2
9 9 19 0.58 5 0.02446472 0.66246271 0.062500000 1
10 10 12 0.18 3 0.08511361 0.18198269 0.111111111 2
11 11 36 -0.11 9 0.02788418 -0.11044692 0.030303030 1
12 12 75 0.27 7 0.01161506 0.27686382 0.013888889 2
13 13 33 0.26 5 0.02716780 0.26610841 0.033333333 1
14 14 121 0.40 4 0.00588000 0.42364893 0.008474576 2
15 15 37 0.49 3 0.01604022 0.53606034 0.029411765 1
16 16 14 0.51 2 0.04211169 0.56272977 0.090909091 2
17 17 40 0.40 3 0.01809231 0.42364893 0.027027027 1
18 18 16 0.34 5 0.05214422 0.35409253 0.076923077 2
19 19 14 0.42 7 0.05217823 0.44769202 0.090909091 1
20 20 20 0.16 1 0.04997133 0.16138670 0.058823529 2
Loading 'metafor' package (version 2.0-0). For an overview
and introduction to the package please type: help(metafor).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.