mschart v0.2.4

0

Monthly downloads

0th

Percentile

Chart Generation for 'Microsoft Word' and 'Microsoft PowerPoint' Documents

Create native charts for 'Microsoft PowerPoint' and 'Microsoft Word' documents. These can then be edited and annotated. Functions are provided to let users create charts, modify and format their content. The chart's underlying data is automatically saved within the 'Word' document or 'PowerPoint' presentation. It extends package 'officer' that does not contain any feature for 'Microsoft' native charts production.

Readme

mschart R package

Travis-CI Build
Status version cranlogs Active

The mschart package provides a framework for easily create charts for ‘Microsoft PowerPoint’ documents. It has to be used with package officer that will produce the charts in new or existing PowerPoint or Word documents.

The user documentation can be read here.

Functions you should be aware of are documented here.

Example

This is a basic example which shows you how to create a line chart.

library(mschart)
library(officer)

linec <- ms_linechart(data = iris, x = "Sepal.Length",
                      y = "Sepal.Width", group = "Species")
linec <- chart_ax_y(linec, num_fmt = "0.00", rotation = -90)

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

doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_chart(doc, chart = linec)

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

Code of Conduct

Anyone getting involved in this package agrees to our Code of Conduct.

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.

Contributing to the package development

A great way to start is to contribute an example or improve the documentation.

If you want to submit a Pull Request to integrate functions of yours, please provide:

  • the new function(s) with code and roxygen tags (with examples)
  • a new section in the appropriate vignette that describes how to use the new function
  • add corresponding tests in directory tests/testthat.

By using rhub (run rhub::check_for_cran()), you will see if everything is ok. When submitted, the PR will be evaluated automatically on travis and appveyor and you will be able to see if something broke.

Functions in mschart

Name Description
chart_data_size Modify symbol size
chart_data_smooth Smooth series
chart_data_fill Modify fill colour
chart_ax_x axis settings
browser_ts Dummy dataset for barchart
body_add_chart add chart into a Word document
browser_data Dummy dataset for barchart
as_bar_stack set a barchart as a stacked barchart
ph_with.ms_chart add a MS Chart output into a PowerPoint object
ph_with_chart add chart into a PowerPoint slide
chart_labels Modify axis and plot labels
chart_labels_text Modify labels font settings
chart_data_stroke Modify marker stroke colour
chart_data_symbol Modify symbol
print.ms_chart ms_chart print method
set_theme set chart theme
chart_data_labels Modify data labels settings
chart_data_line_width Modify line width
chart_settings set chart options
ms_linechart ms_chart object
No Results!

Vignettes of mschart

Name
details.Rmd
introduction.Rmd
No Results!

Last month downloads

Details

Type Package
License MIT + file LICENSE
Encoding UTF-8
LazyData true
URL https://ardata-fr.github.io/mschart/
BugReports https://github.com/ardata-fr/mschart/issues
RoxygenNote 6.1.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2019-06-25 15:42:44 UTC; davidgohel
Repository CRAN
Date/Publication 2019-06-26 09:10:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/mschart)](http://www.rdocumentation.org/packages/mschart)