One of reasons to use R is to avoid using Excel for complex data processing. But, this does not mean one should not use Excel at all. There are some good reasons for it, including communication with non-coding co-workers being probably the most important of them all. To ensure smoothness of workflow consisting of analysis with R and results sharing via Excel, it is necessary to be able to manipulate XLSX files within R.
openxlsx is a great help with this.
This is the second part of series on creating XLSX files. For other parts, follow the tag openxlsx.
Answers to these exercises are available here.
If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page.
openxlsx. Create an
Set the global option for
openxlsx`s formatting of numerics to be two decimal places.
Add a new worksheet to the workbook.
iris data as an excel table in the worksheet, starting at column
Freeze the first row (columns/names.)
Format the first column of the data to highlight green when a value is greater than 5.
Set the width of the columns to 20.
Create a worksheet without gridlines and add some
iris density plot to it, starting at row 2.
At row 1, add a hyperlink to the article about the
iris data-set in Wikipedia.
Save the workbook to a file.