For the data. frame some in Example 3.2.2, what will be your expectation of the R code
Question:
For the data. frame some in Example 3.2.2, what will be your expectation of the R code summary(some)? Validate the expectation by running the code too.
Data from in Example 3.2.2
In this example, we have a few more added complexities. Here, we have to skip the first line of the xls file, which is a description of the data, where the option is skip=1. Columns I, II, and IV are numeric vectors, though Column IV contains years which may be considered both numeric as well as a factor. The variable names in the xls file will be changed with col. names=c("Density","Biomass", "Crop","Year","Soil Layer"). The data points are followed by a two-line citation of the research paper in which the data appears. We should not read this citation into R, and hence we specify that the number of rows which need to read should be 12 and this is done with the option nrows=12. The xls file containing this dataset is Earthwormbiomass.xls. The source of the dataset is the same as discussed in the previous example.
The sapply function shows that we have properly read the data into R.
Step by Step Answer:
A Course In Statistics With R
ISBN: 9781119152729
1st Edition
Authors: Prabhanjan N. Tattar, Suresh Ramaiah, B. G. Manjunath