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
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.
> some some 1 2 ("Earthwormbiomass.xls", Density Biomass 210 15.1 251 22.2 12 3 > sapply (some, class) Density Biomass "integer" "numeric" 0.6 Wheat and Mustard 1999 skip=1, nrows=12, Crop Year Soil. Layer Maize 1998 0-10 Maize 1999 0-10 Crop "factor" "Biomass", "Crop", Year "integer" 10-20 Soil. Layer "factor"
Step by Step Solution
3.43 Rating (159 Votes )
There are 3 Steps involved in it
Solution My expectation of the R code summarysome is that it will give data on ... View full answer
Get step-by-step solutions from verified subject matter experts
