forked from tomwenseleers/export
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5004bf
commit 5d2a2c4
Showing
47 changed files
with
598 additions
and
652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
^.*\.Rproj$ | ||
examples | ||
^\.Rproj\.user$ | ||
cran-comments.md | ||
revdep | ||
^revdep$ | ||
^.git$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,5 @@ CMakeLists.txt.user | |
.#* | ||
*.autosave | ||
*~ | ||
.orig | ||
.orig | ||
/revdep/.cache.rds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,23 +8,20 @@ Authors@R: c(person("Tom", "Wenseleers", role = c("aut", "cre"), | |
person("Christophe", "Vanderaa", role = c("aut"), | ||
email = "[email protected]")) | ||
Depends: R (>= 3.0) | ||
Imports: officer (>= 0.2.2), | ||
rvg (>= 0.1.8), | ||
stats, | ||
Imports: stats, | ||
utils, | ||
datasets, | ||
xtable (>= 1.8-2), | ||
grDevices, | ||
officer (>= 0.2.2), | ||
rvg (>= 0.1.8), | ||
xtable (>= 1.8-2), | ||
flextable (>= 0.4.3), | ||
rgl (>= 0.99.16), | ||
xml2 (>= 1.2.0), | ||
stargazer, | ||
stargazer (>= 5.2.1), | ||
openxlsx (>= 4.0.17), | ||
broom (>= 0.4.4) | ||
Suggests: lattice, | ||
ggplot2 (>= 1.0), | ||
latticeExtra (>= 0.6-28), | ||
tikzDevice | ||
Suggests: ggplot2 (>= 1.0) | ||
Description: Easily export 'R' graphs and statistical output to 'Microsoft | ||
Office' / 'LibreOffice', 'Latex' and 'HTML' Documents, using sensible defaults | ||
that result in publication-quality output with simple, straightforward commands. | ||
|
@@ -34,11 +31,11 @@ Description: Easily export 'R' graphs and statistical output to 'Microsoft | |
of the layout of 'R' graphs in 'Powerpoint' before final publication. Export | ||
of graphs is flexible, and functions enable the currently showing R graph | ||
or the currently showing 'R' stats object to be exported, but also allow the | ||
graphs or stats output to be passed as objects. The package relies on package | ||
'officer' for export to 'Office',and output files are also fully compatible | ||
graphical or tabular output to be passed as objects. The package relies on package | ||
'officer' for export to 'Office' documents,and output files are also fully compatible | ||
with 'LibreOffice'. Base 'R', 'ggplot2' and 'lattice' plots are supported, as | ||
well as a wide variety of 'R' stats objects, via wrappers to 'xtable', 'broom::tidy' | ||
and 'stargazer', including 'aov', 'lm', 'glm', 'lme', 'lmer', 'glmer' and 'coxph' as | ||
well as a wide variety of 'R' stats objects, via wrappers to xtable(), broom::tidy() | ||
and stargazer(), including aov(), lm(), glm(), lme(), glmnet() and coxph() as | ||
well as matrices and data frames and many more... | ||
License: GPL-2 | ||
BugReports: https://github.com/tomwenseleers/export/issues | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
# Create a file name | ||
dir <- tempdir() | ||
filen <- paste0(dir,"\\ggplot") | ||
|
||
# Generate graphical output | ||
library(ggplot2) | ||
library(datasets) | ||
x=qplot(Sepal.Length, Petal.Length, data = iris, | ||
color = Species, size = Petal.Width, alpha = I(0.7)) | ||
x | ||
graph2png(x=x,dpi=400) | ||
graph2tif(x=x) | ||
graph2jpg(x=x) | ||
plot.fun <- function(){ | ||
print(qplot(Sepal.Length, Petal.Length, data = iris, | ||
color = Species, size = Petal.Width, alpha = 0.7)) | ||
} | ||
|
||
\dontrun{ | ||
# use active graph instead of passing plot as object | ||
graph2png(aspectr=1.7) | ||
# There are 3 ways to use graph2bitmap(): | ||
### 1. Pass the plot as an object | ||
graph2png(x=x, file=filen, dpi=400, height = 5, aspectr=4) | ||
graph2tif(x=x, file=filen, dpi=400, height = 5, aspectr=4) | ||
graph2jpg(x=x, file=filen, dpi=400, height = 5, aspectr=4) | ||
### 2. Get the plot from current screen device | ||
\donttest{ # Because the example uses screen devices | ||
x | ||
graph2png(file=filen, dpi=400, height = 5, aspectr=4) | ||
graph2tif(file=filen, dpi=400, height = 5, aspectr=4) | ||
graph2jpg(file=filen, dpi=400, height = 5, aspectr=4) | ||
} | ||
### 3. Pass the plot as a function | ||
\donttest{ # Because the example uses screen devices | ||
graph2png(file=filen, fun=plot.fun, dpi=400, height = 5, aspectr=4) | ||
graph2tif(file=filen, fun=plot.fun, dpi=400, height = 5, aspectr=4) | ||
graph2jpg(file=filen, fun=plot.fun, dpi=400, height = 5, aspectr=4) | ||
} |
Oops, something went wrong.