## generate example table: library(partykit) library(strucchange) airq <- subset(airquality, !is.na(Ozone)) airct <- ctree(Ozone ~ ., data = airq) mytable <- sctest(airct)[[1]] ## create table that can be opened in MS Word: print(xtable(mytable), type="html", file="mytable.doc")
Now you will find a file called "mytable.doc" in the working directory. If you open it, you will find a table that you can edit and copy-paste to other MS Word documents.
Some hints if you want to manually adjust the table to APA lay-out:
- Click right somewhere in table
- Click ‘tabeleigenschappen’ (‘table properties’), then ‘opties’ (‘options’)
- Remove tickmark at ‘Standaardafstand tussen cellen’ (‘default cell spacing’)
- Click ‘OK’ and ‘OK’
No comments:
Post a Comment