June 2017
Beginner to intermediate
576 pages
15h 22m
English
This code also illustrates the capture.output() function. The capture.output function will save the metadata for the raw input file. This is done because we want to track changes done to the input, and we want to capture the contents of the same dataframe at different points in time. That will enable us to save the values of metadata and compare them at different points:
# Save it in case we need to look at the metadata later on. OnlineRetail.Metadata <- capture.output(str(OnlineRetail))# print it now. We can see that the capture.output contains the output of the original str function, and that there are 541,909 observations
Set stringsAsFactors back to TRUE:
options(stringsAsFactors = T)