Output is very important in analysis to show the results of data science to stakeholders. It can primarily be Excel, Powerpoint, and Word documents for data analysis. With the advent of cloud and collaboration tools, there are many ways to communicate the intermediate stages of data analysis. The following shows ways to show output in R and SAS.
There are two ways:
Here, replace will replace an earlier file with same name
ODS stands for output delivery system. It is used to format the output of a SAS program. We can output data by putting output print within ODS HTML and ODS HTML CLOSE. Here we output the PROC Means of a dataset to a different object and print it to an excel file.
Output is in the form of an HTML page which can be saved.
Here we change a working directory to the output folder. We take an object (or create an output dataframe, or object, then output them write.csv (just as we used read.cev to input data).
We can also use fwrite in the data table package.
We can also use write_csv in readr package
For Graphs we can export plots in 3 Ways in RStudio: Picture, PDF, and Copy to Clipboard.
However, there are seven types of images.
We can also have html, pdf and word output of code and output. We can download them locally and also publish it on RPubs; a repository website provided by RStudio.
html output using the knit package/button in RStudio,can be opened in the browser, published and shared on Rpubs.
We have this code:
We use knit as follows:
We have three types of output‐ HTML, Word, PDF by using Knit. Let’s take the HTML output here:
This is our output.
We can open it in the browser on the top left. We can publish it to RPubs using the Publish button on the top right. For secure publishing we can use RConnect.
We can also create Markdown documents of R Code by rmarkdown library.
R Markdown is a file format for making dynamic documents with R. An R Markdown document is written in markdown (an easy‐to‐write plain text format) and contains chunks of embedded R code, like the document below. ‐‐‐ output: html_document ‐‐‐ This is an R Markdown document. (see https://rmarkdown.rstudio.com/articles_intro.html)
18.117.184.189