https://github.com/carlganz/rcppxlsxwriter
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: carlganz
- Language: C++
- Default Branch: master
- Size: 19.5 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 10 years ago
· Last pushed almost 10 years ago
Metadata Files
Readme
readme.Rmd
---
title: "RcppXLSXwriter"
output: github_document
---
[](http://www.repostatus.org/#wip)
[](https://travis-ci.org/carlganz/RcppXLSXwriter)
This package uses John McNamara's C library [libxlsxwriter](http://libxlsxwriter.github.io/) and [Rcpp](http://www.rcpp.org/) to let R users generate customized XLSX files in R. The [`WriteXLS`](https://cran.r-project.org/web/packages/WriteXLS/index.html) package on CRAN is nice, but it requires Perl, and it isn't flexible enough to allow the user to fully customize their Excel output.
With `RcppXLSXwriter` you have the ability to customize each and every cell in your XLSX document.
## Issues
### Portability
So far I have only been able to get the package to build on 32-bit R on Windows.
## Usage
Although `RcppXLSXwriter` only has its bare infrastructure, you still get most of the functionality of libxlsxwriter if you're willing to be verbose.
- First you must build a workbook with `new(XLSXworkbook, *file*)`
- Next you bulid a worksheet in the workbook with `new(XLSXworksheet,*workbook*,*sheetname*)`
- Now you can write to the worksheet with `write` by specifying the x and y range you want to fill, and then giving a character matrix of the same dimension
- You can add formatted content by first creating a format object with `new(XLSXformat,*workbook*)`,adding properties to the format object with its methods, and then passing it to `writef`
Here is a quick example for writing `iris` with bold, exciting header:
```{R}
library(RcppXLSXwriter)
# create workbook
wb <- new(XLSXworkbook, "newFile.xlsx")
# create worksheet
ws <- new(XLSXworksheet, wb, "firstSheet")
# create format for title
titleFmt <- new(XLSXformat, wb)
# set format to font 24, times new roman, bold, underline, and italic
titleFmt$font_size(24)
titleFmt$font_name("times new roman")
titleFmt$bold()
titleFmt$underline()
titleFmt$italic()
# write title
ws$writef(1,seq_len(ncol(iris)),t(as.matrix(names(iris))),titleFmt)
# write data
ws$write(1+seq_len(nrow(iris)),seq_len(ncol(iris)),as.matrix(iris))
# close
wb$close()
```
Owner
- Name: Carl Ganz
- Login: carlganz
- Kind: user
- Location: Los Angeles
- Twitter: carlishganzino
- Repositories: 9
- Profile: https://github.com/carlganz
Some kind of programer
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0