Skip to content
/ mschart Public

❗ This is a read-only mirror of the CRAN R package repository. mschart — Chart Generation for 'Microsoft Word' and 'Microsoft PowerPoint' Documents. Homepage: https://ardata-fr.github.io/officeverse/https://ardata-fr.github.io/mschart/ Report bugs for this package: https://github.com/ardata-fr/mschart/issues

License

Notifications You must be signed in to change notification settings

cran/mschart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mschart R package

R build status version cranlogs Active

mschart logo The mschart package provides a framework for easily create charts for ‘Microsoft PowerPoint’ presentations and ‘Microsoft Word’ documents. It has to be used with package officer that will produce the charts in new or existing PowerPoint or Word documents. With ‘Microsoft Charts’, the data is integrated into the document and linked to the chart. The result can be edited, annotated and resized. If the data is updated in the document, the chart is also updated.

Example

This is a basic example which shows you how to create a scatter plot.

library(mschart)
scatter <-
  ms_scatterchart(
    data = iris, x = "Sepal.Length",
    y = "Sepal.Width", group = "Species"
  )
scatter <- chart_settings(scatter, scatterstyle = "marker")

Then use package officer to send the object as a chart.

library(officer)
doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with(doc, value = scatter, location = ph_location_fullsize())

print(doc, target = "example.pptx")

At any moment, you can type print(your_chart, preview = TRUE) to preview the chart in a temporary PowerPoint file. This requires to have a PowerPoint Viewer installed on the machine.

Installation

You can get the development version from GitHub:

devtools::install_github("ardata-fr/mschart")

Or the latest version on CRAN:

install.packages("mschart")

Contributing to the package

Bug reports

When you file a bug report, please spend some time making it easy for me to follow and reproduce. The more time you spend on making the bug report coherent, the more time I can dedicate to investigate the bug as opposed to the bug report.

About

❗ This is a read-only mirror of the CRAN R package repository. mschart — Chart Generation for 'Microsoft Word' and 'Microsoft PowerPoint' Documents. Homepage: https://ardata-fr.github.io/officeverse/https://ardata-fr.github.io/mschart/ Report bugs for this package: https://github.com/ardata-fr/mschart/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages