Quantcast
Channel: R-bloggers
Viewing all articles
Browse latest Browse all 12081

XLConnect 0.2-14

$
0
0

(This article was first published on Mirai Solutions, and kindly contributed to R-bloggers)

CRAN_Status_BadgeResearch software impactRdoc

We are pleased to announce the release of XLConnect 0.2-14, now available from CRAN and from our GitHub repository.

This release is mainly a maintenance release and comes with the following changes:

The following example illustrates the use of XLConnect to produce a simple report:

require(XLConnect)# Create new Excel workbookwb<-loadWorkbook("earthquakes.xlsx",create=TRUE)# Create worksheet to hold datatargetSheet<-"Earthquakes"createSheet(wb,name=targetSheet)# Export earthquake datawriteWorksheet(wb,data=quakes,sheet=targetSheet)# Create cell style to color events with a magnitude >= 6.0 on the# Richter scalelargeMagnitudeStyle<-getOrCreateCellStyle(wb,name="Large Magnitude")# Use solid red foreground to color rowssetFillForegroundColor(largeMagnitudeStyle,color=XLC$COLOR.RED)setFillPattern(largeMagnitudeStyle,fill=XLC$FILL.SOLID_FOREGROUND)# Determine large magnitude earthquakesrowIdx<-which(quakes$mag>=6.0)# Color rows accordingly# NOTE: Since we include a header row in the worksheet# we need to offset the row indices by 1!setCellStyle(wb,sheet=targetSheet,row=rep(rowIdx+1,each=ncol(quakes)),col=rep_len(seq_len(ncol(quakes)),length(rowIdx)),cellstyle=largeMagnitudeStyle)# Save workbooksaveWorkbook(wb)

XLConnect is a comprehensive and cross-platform R package for manipulating Microsoft Excel files from within R. It does not require any installation of Microsoft Excel or any other special drivers to be able to read & write Excel files. The only requirement is a recent version of a Java Runtime Environment (JRE).

var vglnk = { key: '949efb41171ac6ec1bf7f206d57e90b8' }; (function(d, t) {var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;s.src = '//cdn.viglink.com/api/vglnk.js';var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script'));

To leave a comment for the author, please follow the link and comment on their blog: Mirai Solutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...


Viewing all articles
Browse latest Browse all 12081

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>