un informe de analisis de datos Civil

mostrando la base de datos mtcars

mtcars

detallando los nombres de las columnas de mtcars

names(mtcars)
##  [1] "mpg"  "cyl"  "disp" "hp"   "drat" "wt"   "qsec" "vs"   "am"   "gear"
## [11] "carb"

mostrando la estructura de las columnas

str(mtcars)
## 'data.frame':    32 obs. of  11 variables:
##  $ mpg : num  21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
##  $ cyl : num  6 6 4 6 8 6 8 4 4 6 ...
##  $ disp: num  160 160 108 258 360 ...
##  $ hp  : num  110 110 93 110 175 105 245 62 95 123 ...
##  $ drat: num  3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...
##  $ wt  : num  2.62 2.88 2.32 3.21 3.44 ...
##  $ qsec: num  16.5 17 18.6 19.4 17 ...
##  $ vs  : num  0 0 1 1 0 1 0 1 1 1 ...
##  $ am  : num  1 1 1 0 0 0 0 0 0 0 ...
##  $ gear: num  4 4 4 3 3 3 3 4 4 4 ...
##  $ carb: num  4 4 1 1 2 1 4 2 2 4 ...

descriptiva de la base de datos mtcars

summary(mtcars)
##       mpg             cyl             disp             hp       
##  Min.   :10.40   Min.   :4.000   Min.   : 71.1   Min.   : 52.0  
##  1st Qu.:15.43   1st Qu.:4.000   1st Qu.:120.8   1st Qu.: 96.5  
##  Median :19.20   Median :6.000   Median :196.3   Median :123.0  
##  Mean   :20.09   Mean   :6.188   Mean   :230.7   Mean   :146.7  
##  3rd Qu.:22.80   3rd Qu.:8.000   3rd Qu.:326.0   3rd Qu.:180.0  
##  Max.   :33.90   Max.   :8.000   Max.   :472.0   Max.   :335.0  
##       drat             wt             qsec             vs        
##  Min.   :2.760   Min.   :1.513   Min.   :14.50   Min.   :0.0000  
##  1st Qu.:3.080   1st Qu.:2.581   1st Qu.:16.89   1st Qu.:0.0000  
##  Median :3.695   Median :3.325   Median :17.71   Median :0.0000  
##  Mean   :3.597   Mean   :3.217   Mean   :17.85   Mean   :0.4375  
##  3rd Qu.:3.920   3rd Qu.:3.610   3rd Qu.:18.90   3rd Qu.:1.0000  
##  Max.   :4.930   Max.   :5.424   Max.   :22.90   Max.   :1.0000  
##        am              gear            carb      
##  Min.   :0.0000   Min.   :3.000   Min.   :1.000  
##  1st Qu.:0.0000   1st Qu.:3.000   1st Qu.:2.000  
##  Median :0.0000   Median :4.000   Median :2.000  
##  Mean   :0.4062   Mean   :3.688   Mean   :2.812  
##  3rd Qu.:1.0000   3rd Qu.:4.000   3rd Qu.:4.000  
##  Max.   :1.0000   Max.   :5.000   Max.   :8.000

resumenes de algunas variables mpg

summary(mtcars$mpg)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   10.40   15.43   19.20   20.09   22.80   33.90

resumen de la variable hp

summary(mtcars$hp)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    52.0    96.5   123.0   146.7   180.0   335.0

graficos de las variables mtcars

matriz de dispersion de mtcars

plot(mtcars)

grafica de histograma de frecuencias mpg

hist(mtcars$mpg)

grafica del histograma de densidad de mpg

hist(mtcars$mpg, freq = F)
lines(density(mtcars$mpg))

grafico de boxplot

boxplot(mtcars$mpg)

trabajando con mis propios datos agregados petreos

library(readxl)
agregados <- read_excel("DATOS_para_EasyFit (1).xls", 
    sheet = "Agregados")
agregados

descriptiva de agregados

summary(agregados)
##      fgeo                tmax          tmaxnom           pea       
##  Length:60          Min.   :1.500   Min.   :2.540   Min.   :1.910  
##  Class :character   1st Qu.:3.232   1st Qu.:2.540   1st Qu.:2.493  
##  Mode  :character   Median :3.810   Median :3.810   Median :2.515  
##                     Mean   :3.273   Mean   :3.408   Mean   :2.491  
##                     3rd Qu.:3.810   3rd Qu.:3.810   3rd Qu.:2.540  
##                     Max.   :5.080   Max.   :3.810   Max.   :2.690  
##       psss            pen             abs            iapla      
##  Min.   :1.970   Min.   :2.020   Min.   :0.940   Min.   :13.32  
##  1st Qu.:2.550   1st Qu.:2.625   1st Qu.:1.975   1st Qu.:20.22  
##  Median :2.570   Median :2.650   Median :2.245   Median :22.98  
##  Mean   :2.545   Mean   :2.631   Mean   :2.213   Mean   :23.52  
##  3rd Qu.:2.590   3rd Qu.:2.690   3rd Qu.:2.565   3rd Qu.:25.30  
##  Max.   :2.750   Max.   :2.860   Max.   :3.700   Max.   :39.91  
##      ialar            pus            puc            vas             vac       
##  Min.   :18.37   Min.   :1276   Min.   :1452   Min.   :22.81   Min.   :22.81  
##  1st Qu.:22.39   1st Qu.:1316   1st Qu.:1523   1st Qu.:41.00   1st Qu.:37.32  
##  Median :25.39   Median :1344   Median :1545   Median :46.04   Median :38.51  
##  Mean   :27.30   Mean   :1343   Mean   :1545   Mean   :43.99   Mean   :38.02  
##  3rd Qu.:32.57   3rd Qu.:1356   3rd Qu.:1580   3rd Qu.:47.10   3rd Qu.:39.33  
##  Max.   :42.54   Max.   :1436   Max.   :1617   Max.   :49.70   Max.   :42.59  
##       trit            desg           rcompa         denscon         rcompc     
##  Min.   :22.98   Min.   :26.15   Min.   :159.0   Min.   :2173   Min.   :179.0  
##  1st Qu.:25.71   1st Qu.:27.47   1st Qu.:260.1   1st Qu.:2308   1st Qu.:262.1  
##  Median :27.19   Median :28.11   Median :319.1   Median :2334   Median :270.5  
##  Mean   :26.73   Mean   :28.19   Mean   :334.1   Mean   :2318   Mean   :266.3  
##  3rd Qu.:28.26   3rd Qu.:28.61   3rd Qu.:397.0   3rd Qu.:2355   3rd Qu.:277.2  
##  Max.   :29.76   Max.   :31.75   Max.   :669.5   Max.   :2385   Max.   :282.2

boxplot de Rcompa

boxplot(agregados$rcompa)

boxplot de rcompa segun su formacion geologica

boxplot(agregados$rcompa~agregados$fgeo)