The summary function is important to review the data limits of your data. In R, it is very simple you can view the summary of all your parameters and of single parameters by following codes:
# Import your data file
setwd("D:/R_working/script_book")
data_soil=read.csv("data_soil.csv",na="***")
data_soil=data.frame(data_soil)
# Summary of all data
summary(data_soil)
## water_contents soil_phosphorus soil_potassium electrical_conductivity
## Min. :28.10 Min. :8.460 Min. :184.0 Min. :1.900
## 1st Qu.:31.16 1st Qu.:8.540 1st Qu.:189.0 1st Qu.:2.170
## Median :33.01 Median :8.595 Median :193.0 Median :2.300
## Mean :35.89 Mean :8.710 Mean :193.3 Mean :2.326
## 3rd Qu.:39.42 3rd Qu.:8.775 3rd Qu.:196.2 3rd Qu.:2.440
## Max. :54.10 Max. :9.540 Max. :210.0 Max. :3.210
Sumamry of singel paramters can be viewed by following codes:
summary(data_soil$Organic_matter)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.3900 0.4700 0.5300 0.5394 0.5825 0.7900
No comments:
Post a Comment