Part 1

df <- read.csv(file ="LungCapData.txt",header = T,sep = "\t")  

str(df)
## 'data.frame':    725 obs. of  6 variables:
##  $ LungCap  : num  6.47 10.12 9.55 11.12 4.8 ...
##  $ Age      : int  6 18 16 14 5 11 8 11 15 11 ...
##  $ Height   : num  62.1 74.7 69.7 71 56.9 58.7 63.3 70.4 70.5 59.2 ...
##  $ Smoke    : Factor w/ 2 levels "no","yes": 1 2 1 1 1 1 1 1 1 1 ...
##  $ Gender   : Factor w/ 2 levels "female","male": 2 1 1 2 2 1 2 2 2 2 ...
##  $ Caesarean: Factor w/ 2 levels "no","yes": 1 1 2 1 1 1 2 1 1 1 ...
LungCapData <- df
mean(LungCapData$LungCap)
## [1] 7.863148
mean(LungCapData$Age)
## [1] 12.3269
mean(LungCapData$Height)
## [1] 64.83628
summary(df)
##     LungCap            Age            Height      Smoke        Gender   
##  Min.   : 0.507   Min.   : 3.00   Min.   :45.30   no :648   female:358  
##  1st Qu.: 6.150   1st Qu.: 9.00   1st Qu.:59.90   yes: 77   male  :367  
##  Median : 8.000   Median :13.00   Median :65.40                         
##  Mean   : 7.863   Mean   :12.33   Mean   :64.84                         
##  3rd Qu.: 9.800   3rd Qu.:15.00   3rd Qu.:70.30                         
##  Max.   :14.675   Max.   :19.00   Max.   :81.80                         
##  Caesarean
##  no :561  
##  yes:164  
##           
##           
##           
## 
IQR(df$LungCap)
## [1] 3.65
IQR(df$Age)
## [1] 6
IQR(df$Height)
## [1] 10.4

Calculate the median

LungCapData <- df
median(LungCapData$LungCap)
## [1] 8
median(LungCapData$Age)
## [1] 13
median(LungCapData$Height)
## [1] 65.4

Calculate the Maximum

LungCapData <- df
max(LungCapData$LungCap)
## [1] 14.675
max(LungCapData$Age)
## [1] 19
max(LungCapData$Height)
## [1] 81.8

Calculate the Minimum

min(LungCapData$LungCap)
## [1] 0.507
min(LungCapData$Age)
## [1] 3
min(LungCapData$Height)
## [1] 45.3
summary(LungCapData)
##     LungCap            Age            Height      Smoke        Gender   
##  Min.   : 0.507   Min.   : 3.00   Min.   :45.30   no :648   female:358  
##  1st Qu.: 6.150   1st Qu.: 9.00   1st Qu.:59.90   yes: 77   male  :367  
##  Median : 8.000   Median :13.00   Median :65.40                         
##  Mean   : 7.863   Mean   :12.33   Mean   :64.84                         
##  3rd Qu.: 9.800   3rd Qu.:15.00   3rd Qu.:70.30                         
##  Max.   :14.675   Max.   :19.00   Max.   :81.80                         
##  Caesarean
##  no :561  
##  yes:164  
##           
##           
##           
## 

Now we make the histograms of our variables

LungCap <- LungCapData$LungCap
hist(LungCap,col = "red",main ="histogram de Lung Cap")

Age <- LungCapData$Age
hist(Age,col = "blue",main ="histogram de Age")

Height <- LungCapData$Height
hist(Height,col = "yellow",main ="histogram de Height")

# Also, we are going to compute boxplots

library(ggplot2)
?boxplot
boxplot(LungCap,col = "Red")

boxplot(Age,col = "blue")

boxplot(Height,col = "yellow")

Taulas variables qualitatives

library(ggplot2)
Gender.freq <- table(df$Gender)
Gender.freq
## 
## female   male 
##    358    367
Smoke.freq <- table(df$Smoke)
Smoke.freq
## 
##  no yes 
## 648  77
Caesarean.freq <- table(df$Caesarean)
Caesarean.freq
## 
##  no yes 
## 561 164
Age.freq <- table(df$Age)

Histogramas

library(ggplot2)
hist(Gender.freq,col = "Green")

hist(Smoke.freq,col ="Blue")

hist(Caesarean.freq,col = "Yellow")

# Blox-Plot

library(ggplot2)

ggplot(df,aes(df$Smoke,df$Gender))+geom_boxplot()

# two quantitative variables

ggplot(df,aes(df$Age,df$Height))+geom_boxplot()
## Warning: Continuous x aesthetic -- did you forget aes(group=...)?

summary(df$Height,df$Age)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   45.30   59.90   65.40   64.84   70.30   81.80

qualitative and quantitative

summary(df$Age,df$Smoke)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    3.00    9.00   13.00   12.33   15.00   19.00
barplot(Smoke.freq,Age.freq)

#Part 2 #f abs

a <- table(df$LungCap)
b <- table(df$Age)
c <- table(df$Height)
d <- table(df$Smoke)
e <- table(df$Gender)
f <- table(df$Caesarean)

f relativa

g <- table(df$LungCap)/725
h <- table(df$Age)/725
i <- table(df$Height)/725
j <- table(df$Smoke)/725
k <- table(df$Gender)/725
l <- table(df$Caesarean)/725

Frequencies absolutas acumulada

cumsum(a)
##  0.507  1.025  1.125  1.175  1.325   1.45  1.575  1.625  1.675  1.775 
##      1      2      3      4      5      6      7      8      9     10 
##   1.85    1.9  1.925   1.95      2  2.025   2.25  2.375  2.475   2.55 
##     11     12     13     14     15     16     19     20     21     22 
##  2.625   2.65  2.725  2.825   2.85  2.875  2.925   2.95  3.025    3.1 
##     24     26     29     30     31     34     36     37     38     40 
##  3.175  3.225   3.25    3.4  3.425   3.45    3.6  3.625   3.65  3.675 
##     42     43     44     45     48     49     50     51     52     54 
##    3.7   3.75  3.825   3.85    3.9  3.925  3.975  4.075  4.125   4.15 
##     56     57     58     59     62     64     66     67     68     69 
##    4.2   4.25  4.325   4.35  4.425   4.45  4.475    4.5  4.525   4.55 
##     71     74     77     78     81     83     85     86     87     88 
##  4.575  4.625   4.65    4.7  4.725  4.775    4.8  4.825   4.85  4.875 
##     89     92     93     95     98     99    100    101    103    104 
##    4.9   4.95  4.975  5.025   5.05  5.075  5.125   5.15  5.175    5.2 
##    106    107    110    113    116    117    118    121    122    123 
##  5.225   5.25  5.275    5.3  5.325   5.35  5.375  5.425  5.475    5.5 
##    125    127    128    129    131    132    135    136    137    139 
##   5.55  5.575    5.6  5.625   5.65  5.675    5.7  5.725  5.775  5.825 
##    142    143    144    145    148    149    150    152    153    154 
##   5.85  5.875   5.95      6   6.05  6.075    6.1  6.125   6.15  6.175 
##    158    162    165    167    171    174    177    180    183    186 
##    6.2  6.225   6.25  6.275    6.3  6.325  6.375    6.4  6.425   6.45 
##    189    193    194    195    197    199    200    201    202    209 
##  6.475    6.5  6.525   6.55  6.575    6.6  6.625   6.65  6.675    6.7 
##    212    214    216    219    223    224    226    228    229    234 
##  6.725   6.75  6.775    6.8  6.825   6.85    6.9  6.925   6.95  6.975 
##    238    240    241    243    246    250    253    255    259    261 
##      7  7.025   7.05  7.075    7.1  7.125   7.15  7.175    7.2  7.225 
##    263    265    267    268    270    271    272    273    274    276 
##   7.25  7.275    7.3  7.325   7.35  7.375    7.4  7.425   7.45  7.475 
##    278    282    284    288    293    296    300    302    305    309 
##    7.5   7.55  7.575  7.625   7.65  7.675    7.7  7.725   7.75  7.775 
##    310    316    318    321    324    326    329    330    332    333 
##    7.8  7.825   7.85  7.875    7.9  7.925   7.95  7.975      8  8.025 
##    335    342    345    347    350    355    358    360    367    371 
##   8.05  8.075    8.1  8.125  8.175    8.2  8.225   8.25  8.275    8.3 
##    372    374    375    379    380    383    387    390    393    394 
##  8.325   8.35  8.375  8.425   8.45  8.475    8.5  8.525   8.55  8.575 
##    396    404    405    410    411    413    418    419    422    424 
##    8.6  8.625   8.65  8.675    8.7  8.725  8.775    8.8  8.825   8.85 
##    430    436    438    439    442    446    453    456    459    462 
##  8.875    8.9  8.925  8.975      9  9.025   9.05    9.1  9.125   9.15 
##    464    466    467    472    475    479    482    487    488    490 
##  9.175    9.2  9.225  9.275    9.3  9.325   9.35  9.375    9.4   9.45 
##    493    496    498    501    502    505    506    509    510    512 
##  9.475    9.5  9.525   9.55  9.575    9.6  9.625   9.65  9.675    9.7 
##    516    517    520    523    524    525    528    529    534    536 
##  9.725   9.75    9.8  9.825   9.85  9.875    9.9  9.925   9.95  9.975 
##    539    542    544    548    551    553    555    558    560    561 
##     10 10.025  10.05   10.1 10.125 10.175   10.2  10.25 10.275   10.3 
##    562    566    569    572    574    576    581    582    584    586 
## 10.325  10.35 10.375   10.4 10.425  10.45 10.475   10.5 10.525  10.55 
##    587    589    590    594    596    599    603    605    606    607 
## 10.575   10.6 10.625  10.65 10.675   10.7 10.725  10.75 10.775   10.8 
##    608    612    613    615    617    621    624    625    627    628 
## 10.825  10.85 10.875   10.9 10.925  10.95 10.975     11 11.025  11.05 
##    630    631    633    635    638    639    641    642    644    645 
## 11.075 11.125 11.175 11.225 11.275   11.3 11.325  11.35   11.4   11.5 
##    649    651    652    657    658    659    661    662    664    667 
## 11.525  11.55 11.575   11.6 11.625  11.65 11.675   11.7  11.75 11.775 
##    668    669    671    672    673    675    676    678    679    680 
##   11.8 11.825 11.875   11.9  11.95  12.05 12.125  12.15   12.2 12.225 
##    682    683    685    687    688    690    692    694    695    697 
## 12.275 12.325 12.375   12.4 12.425   12.5 12.625   12.7   12.9 12.925 
##    698    701    702    703    705    706    707    708    709    710 
##  12.95 13.025  13.05 13.075   13.1   13.2 13.325 13.375 13.875 14.375 
##    712    713    714    715    716    717    718    721    722    723 
##  14.55 14.675 
##    724    725
cumsum(b)
##   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19 
##  13  19  39  64 101 142 182 233 291 359 428 484 548 602 645 688 725
cumsum(c)
## 45.3 46.6   47 47.4 47.7 47.8   48 48.1 48.2 48.7 48.8 48.9   49 49.2 49.3 
##    1    2    3    5    6    7    8    9   10   11   12   13   14   15   16 
## 49.8 49.9 50.3 50.5 50.7   51 51.1 51.2 51.4 51.5 51.6 51.7 51.9   52 52.1 
##   17   18   19   20   21   24   25   26   27   29   30   33   36   38   39 
## 52.7 52.8 52.9   53 53.2 53.3 53.5 53.6 53.7 53.8 53.9 54.2 54.3 54.5 54.7 
##   42   45   47   48   50   51   52   53   56   58   60   61   62   63   64 
## 54.8 54.9   55 55.1 55.2 55.4 55.5 55.6 55.7 55.8 55.9   56 56.1 56.2 56.3 
##   65   68   69   73   74   76   80   86   88   89   91   93   96   97   99 
## 56.4 56.5 56.6 56.7 56.8 56.9   57 57.1 57.2 57.3 57.4 57.5 57.7 57.8 57.9 
##  100  102  108  110  114  116  117  119  120  123  126  127  128  129  130 
##   58 58.3 58.4 58.5 58.6 58.7 58.8 58.9   59 59.1 59.2 59.3 59.4 59.5 59.7 
##  133  135  140  145  146  150  153  156  158  159  165  169  173  174  178 
## 59.8 59.9   60 60.1 60.2 60.3 60.4 60.5 60.6 60.7 60.8 60.9   61 61.1 61.2 
##  180  184  188  191  195  197  202  204  207  210  211  212  214  219  222 
## 61.3 61.4 61.5 61.6 61.7 61.8 61.9   62 62.1 62.2 62.3 62.4 62.5 62.6 62.7 
##  224  230  234  238  240  244  248  252  258  259  260  263  265  271  273 
## 62.8 62.9   63 63.1 63.2 63.3 63.4 63.5 63.6 63.7 63.9   64 64.1 64.2 64.3 
##  277  279  283  284  287  294  300  305  309  312  316  319  324  325  327 
## 64.4 64.5 64.6 64.7 64.8 64.9   65 65.1 65.2 65.3 65.4 65.5 65.6 65.7 65.8 
##  331  333  335  341  344  347  351  355  356  361  369  376  382  386  390 
## 65.9   66 66.1 66.2 66.3 66.4 66.5 66.6 66.7 66.8 66.9   67 67.1 67.2 67.3 
##  393  399  402  405  410  415  419  423  424  426  430  431  433  436  440 
## 67.4 67.5 67.6 67.7 67.8 67.9   68 68.1 68.2 68.3 68.4 68.5 68.6 68.7 68.8 
##  444  451  455  460  463  465  469  473  478  481  485  486  492  495  499 
## 68.9   69 69.1 69.2 69.3 69.4 69.6 69.7 69.8 69.9   70 70.1 70.2 70.3 70.4 
##  502  506  509  512  519  525  527  531  533  536  538  540  543  544  548 
## 70.5 70.6 70.8 70.9   71 71.1 71.2 71.3 71.4 71.5 71.6 71.7 71.8 71.9   72 
##  552  554  556  561  565  569  574  576  580  584  587  589  592  597  600 
## 72.1 72.2 72.3 72.4 72.5 72.6 72.7 72.8 72.9   73 73.1 73.2 73.3 73.4 73.5 
##  601  604  605  609  614  616  617  619  621  623  626  627  630  632  639 
## 73.6 73.7 73.8 73.9   74 74.1 74.2 74.3 74.4 74.5 74.6 74.7 74.8 74.9   75 
##  643  645  647  650  654  655  659  661  663  664  666  668  669  672  673 
## 75.1 75.2 75.3 75.4 75.5 75.6 75.7 75.8 75.9   76 76.1 76.2 76.3 76.4 76.5 
##  674  676  677  679  682  684  688  691  692  693  694  696  698  699  700 
## 76.6 76.8 76.9 77.2 77.4 77.6 77.7   78 78.2 78.4 78.6 78.9 79.1 79.3 79.6 
##  702  704  706  707  708  709  710  711  712  714  715  717  718  719  721 
## 79.8 80.3 80.8 81.8 
##  722  723  724  725
cumsum(d)
##  no yes 
## 648 725
cumsum(e)
## female   male 
##    358    725
cumsum(f)
##  no yes 
## 561 725

Frequencies absoluta acumulada relativas

cumsum(g)
##       0.507       1.025       1.125       1.175       1.325        1.45 
## 0.001379310 0.002758621 0.004137931 0.005517241 0.006896552 0.008275862 
##       1.575       1.625       1.675       1.775        1.85         1.9 
## 0.009655172 0.011034483 0.012413793 0.013793103 0.015172414 0.016551724 
##       1.925        1.95           2       2.025        2.25       2.375 
## 0.017931034 0.019310345 0.020689655 0.022068966 0.026206897 0.027586207 
##       2.475        2.55       2.625        2.65       2.725       2.825 
## 0.028965517 0.030344828 0.033103448 0.035862069 0.040000000 0.041379310 
##        2.85       2.875       2.925        2.95       3.025         3.1 
## 0.042758621 0.046896552 0.049655172 0.051034483 0.052413793 0.055172414 
##       3.175       3.225        3.25         3.4       3.425        3.45 
## 0.057931034 0.059310345 0.060689655 0.062068966 0.066206897 0.067586207 
##         3.6       3.625        3.65       3.675         3.7        3.75 
## 0.068965517 0.070344828 0.071724138 0.074482759 0.077241379 0.078620690 
##       3.825        3.85         3.9       3.925       3.975       4.075 
## 0.080000000 0.081379310 0.085517241 0.088275862 0.091034483 0.092413793 
##       4.125        4.15         4.2        4.25       4.325        4.35 
## 0.093793103 0.095172414 0.097931034 0.102068966 0.106206897 0.107586207 
##       4.425        4.45       4.475         4.5       4.525        4.55 
## 0.111724138 0.114482759 0.117241379 0.118620690 0.120000000 0.121379310 
##       4.575       4.625        4.65         4.7       4.725       4.775 
## 0.122758621 0.126896552 0.128275862 0.131034483 0.135172414 0.136551724 
##         4.8       4.825        4.85       4.875         4.9        4.95 
## 0.137931034 0.139310345 0.142068966 0.143448276 0.146206897 0.147586207 
##       4.975       5.025        5.05       5.075       5.125        5.15 
## 0.151724138 0.155862069 0.160000000 0.161379310 0.162758621 0.166896552 
##       5.175         5.2       5.225        5.25       5.275         5.3 
## 0.168275862 0.169655172 0.172413793 0.175172414 0.176551724 0.177931034 
##       5.325        5.35       5.375       5.425       5.475         5.5 
## 0.180689655 0.182068966 0.186206897 0.187586207 0.188965517 0.191724138 
##        5.55       5.575         5.6       5.625        5.65       5.675 
## 0.195862069 0.197241379 0.198620690 0.200000000 0.204137931 0.205517241 
##         5.7       5.725       5.775       5.825        5.85       5.875 
## 0.206896552 0.209655172 0.211034483 0.212413793 0.217931034 0.223448276 
##        5.95           6        6.05       6.075         6.1       6.125 
## 0.227586207 0.230344828 0.235862069 0.240000000 0.244137931 0.248275862 
##        6.15       6.175         6.2       6.225        6.25       6.275 
## 0.252413793 0.256551724 0.260689655 0.266206897 0.267586207 0.268965517 
##         6.3       6.325       6.375         6.4       6.425        6.45 
## 0.271724138 0.274482759 0.275862069 0.277241379 0.278620690 0.288275862 
##       6.475         6.5       6.525        6.55       6.575         6.6 
## 0.292413793 0.295172414 0.297931034 0.302068966 0.307586207 0.308965517 
##       6.625        6.65       6.675         6.7       6.725        6.75 
## 0.311724138 0.314482759 0.315862069 0.322758621 0.328275862 0.331034483 
##       6.775         6.8       6.825        6.85         6.9       6.925 
## 0.332413793 0.335172414 0.339310345 0.344827586 0.348965517 0.351724138 
##        6.95       6.975           7       7.025        7.05       7.075 
## 0.357241379 0.360000000 0.362758621 0.365517241 0.368275862 0.369655172 
##         7.1       7.125        7.15       7.175         7.2       7.225 
## 0.372413793 0.373793103 0.375172414 0.376551724 0.377931034 0.380689655 
##        7.25       7.275         7.3       7.325        7.35       7.375 
## 0.383448276 0.388965517 0.391724138 0.397241379 0.404137931 0.408275862 
##         7.4       7.425        7.45       7.475         7.5        7.55 
## 0.413793103 0.416551724 0.420689655 0.426206897 0.427586207 0.435862069 
##       7.575       7.625        7.65       7.675         7.7       7.725 
## 0.438620690 0.442758621 0.446896552 0.449655172 0.453793103 0.455172414 
##        7.75       7.775         7.8       7.825        7.85       7.875 
## 0.457931034 0.459310345 0.462068966 0.471724138 0.475862069 0.478620690 
##         7.9       7.925        7.95       7.975           8       8.025 
## 0.482758621 0.489655172 0.493793103 0.496551724 0.506206897 0.511724138 
##        8.05       8.075         8.1       8.125       8.175         8.2 
## 0.513103448 0.515862069 0.517241379 0.522758621 0.524137931 0.528275862 
##       8.225        8.25       8.275         8.3       8.325        8.35 
## 0.533793103 0.537931034 0.542068966 0.543448276 0.546206897 0.557241379 
##       8.375       8.425        8.45       8.475         8.5       8.525 
## 0.558620690 0.565517241 0.566896552 0.569655172 0.576551724 0.577931034 
##        8.55       8.575         8.6       8.625        8.65       8.675 
## 0.582068966 0.584827586 0.593103448 0.601379310 0.604137931 0.605517241 
##         8.7       8.725       8.775         8.8       8.825        8.85 
## 0.609655172 0.615172414 0.624827586 0.628965517 0.633103448 0.637241379 
##       8.875         8.9       8.925       8.975           9       9.025 
## 0.640000000 0.642758621 0.644137931 0.651034483 0.655172414 0.660689655 
##        9.05         9.1       9.125        9.15       9.175         9.2 
## 0.664827586 0.671724138 0.673103448 0.675862069 0.680000000 0.684137931 
##       9.225       9.275         9.3       9.325        9.35       9.375 
## 0.686896552 0.691034483 0.692413793 0.696551724 0.697931034 0.702068966 
##         9.4        9.45       9.475         9.5       9.525        9.55 
## 0.703448276 0.706206897 0.711724138 0.713103448 0.717241379 0.721379310 
##       9.575         9.6       9.625        9.65       9.675         9.7 
## 0.722758621 0.724137931 0.728275862 0.729655172 0.736551724 0.739310345 
##       9.725        9.75         9.8       9.825        9.85       9.875 
## 0.743448276 0.747586207 0.750344828 0.755862069 0.760000000 0.762758621 
##         9.9       9.925        9.95       9.975          10      10.025 
## 0.765517241 0.769655172 0.772413793 0.773793103 0.775172414 0.780689655 
##       10.05        10.1      10.125      10.175        10.2       10.25 
## 0.784827586 0.788965517 0.791724138 0.794482759 0.801379310 0.802758621 
##      10.275        10.3      10.325       10.35      10.375        10.4 
## 0.805517241 0.808275862 0.809655172 0.812413793 0.813793103 0.819310345 
##      10.425       10.45      10.475        10.5      10.525       10.55 
## 0.822068966 0.826206897 0.831724138 0.834482759 0.835862069 0.837241379 
##      10.575        10.6      10.625       10.65      10.675        10.7 
## 0.838620690 0.844137931 0.845517241 0.848275862 0.851034483 0.856551724 
##      10.725       10.75      10.775        10.8      10.825       10.85 
## 0.860689655 0.862068966 0.864827586 0.866206897 0.868965517 0.870344828 
##      10.875        10.9      10.925       10.95      10.975          11 
## 0.873103448 0.875862069 0.880000000 0.881379310 0.884137931 0.885517241 
##      11.025       11.05      11.075      11.125      11.175      11.225 
## 0.888275862 0.889655172 0.895172414 0.897931034 0.899310345 0.906206897 
##      11.275        11.3      11.325       11.35        11.4        11.5 
## 0.907586207 0.908965517 0.911724138 0.913103448 0.915862069 0.920000000 
##      11.525       11.55      11.575        11.6      11.625       11.65 
## 0.921379310 0.922758621 0.925517241 0.926896552 0.928275862 0.931034483 
##      11.675        11.7       11.75      11.775        11.8      11.825 
## 0.932413793 0.935172414 0.936551724 0.937931034 0.940689655 0.942068966 
##      11.875        11.9       11.95       12.05      12.125       12.15 
## 0.944827586 0.947586207 0.948965517 0.951724138 0.954482759 0.957241379 
##        12.2      12.225      12.275      12.325      12.375        12.4 
## 0.958620690 0.961379310 0.962758621 0.966896552 0.968275862 0.969655172 
##      12.425        12.5      12.625        12.7        12.9      12.925 
## 0.972413793 0.973793103 0.975172414 0.976551724 0.977931034 0.979310345 
##       12.95      13.025       13.05      13.075        13.1        13.2 
## 0.982068966 0.983448276 0.984827586 0.986206897 0.987586207 0.988965517 
##      13.325      13.375      13.875      14.375       14.55      14.675 
## 0.990344828 0.994482759 0.995862069 0.997241379 0.998620690 1.000000000
cumsum(h)
##          3          4          5          6          7          8 
## 0.01793103 0.02620690 0.05379310 0.08827586 0.13931034 0.19586207 
##          9         10         11         12         13         14 
## 0.25103448 0.32137931 0.40137931 0.49517241 0.59034483 0.66758621 
##         15         16         17         18         19 
## 0.75586207 0.83034483 0.88965517 0.94896552 1.00000000
cumsum(i)
##        45.3        46.6          47        47.4        47.7        47.8 
## 0.001379310 0.002758621 0.004137931 0.006896552 0.008275862 0.009655172 
##          48        48.1        48.2        48.7        48.8        48.9 
## 0.011034483 0.012413793 0.013793103 0.015172414 0.016551724 0.017931034 
##          49        49.2        49.3        49.8        49.9        50.3 
## 0.019310345 0.020689655 0.022068966 0.023448276 0.024827586 0.026206897 
##        50.5        50.7          51        51.1        51.2        51.4 
## 0.027586207 0.028965517 0.033103448 0.034482759 0.035862069 0.037241379 
##        51.5        51.6        51.7        51.9          52        52.1 
## 0.040000000 0.041379310 0.045517241 0.049655172 0.052413793 0.053793103 
##        52.7        52.8        52.9          53        53.2        53.3 
## 0.057931034 0.062068966 0.064827586 0.066206897 0.068965517 0.070344828 
##        53.5        53.6        53.7        53.8        53.9        54.2 
## 0.071724138 0.073103448 0.077241379 0.080000000 0.082758621 0.084137931 
##        54.3        54.5        54.7        54.8        54.9          55 
## 0.085517241 0.086896552 0.088275862 0.089655172 0.093793103 0.095172414 
##        55.1        55.2        55.4        55.5        55.6        55.7 
## 0.100689655 0.102068966 0.104827586 0.110344828 0.118620690 0.121379310 
##        55.8        55.9          56        56.1        56.2        56.3 
## 0.122758621 0.125517241 0.128275862 0.132413793 0.133793103 0.136551724 
##        56.4        56.5        56.6        56.7        56.8        56.9 
## 0.137931034 0.140689655 0.148965517 0.151724138 0.157241379 0.160000000 
##          57        57.1        57.2        57.3        57.4        57.5 
## 0.161379310 0.164137931 0.165517241 0.169655172 0.173793103 0.175172414 
##        57.7        57.8        57.9          58        58.3        58.4 
## 0.176551724 0.177931034 0.179310345 0.183448276 0.186206897 0.193103448 
##        58.5        58.6        58.7        58.8        58.9          59 
## 0.200000000 0.201379310 0.206896552 0.211034483 0.215172414 0.217931034 
##        59.1        59.2        59.3        59.4        59.5        59.7 
## 0.219310345 0.227586207 0.233103448 0.238620690 0.240000000 0.245517241 
##        59.8        59.9          60        60.1        60.2        60.3 
## 0.248275862 0.253793103 0.259310345 0.263448276 0.268965517 0.271724138 
##        60.4        60.5        60.6        60.7        60.8        60.9 
## 0.278620690 0.281379310 0.285517241 0.289655172 0.291034483 0.292413793 
##          61        61.1        61.2        61.3        61.4        61.5 
## 0.295172414 0.302068966 0.306206897 0.308965517 0.317241379 0.322758621 
##        61.6        61.7        61.8        61.9          62        62.1 
## 0.328275862 0.331034483 0.336551724 0.342068966 0.347586207 0.355862069 
##        62.2        62.3        62.4        62.5        62.6        62.7 
## 0.357241379 0.358620690 0.362758621 0.365517241 0.373793103 0.376551724 
##        62.8        62.9          63        63.1        63.2        63.3 
## 0.382068966 0.384827586 0.390344828 0.391724138 0.395862069 0.405517241 
##        63.4        63.5        63.6        63.7        63.9          64 
## 0.413793103 0.420689655 0.426206897 0.430344828 0.435862069 0.440000000 
##        64.1        64.2        64.3        64.4        64.5        64.6 
## 0.446896552 0.448275862 0.451034483 0.456551724 0.459310345 0.462068966 
##        64.7        64.8        64.9          65        65.1        65.2 
## 0.470344828 0.474482759 0.478620690 0.484137931 0.489655172 0.491034483 
##        65.3        65.4        65.5        65.6        65.7        65.8 
## 0.497931034 0.508965517 0.518620690 0.526896552 0.532413793 0.537931034 
##        65.9          66        66.1        66.2        66.3        66.4 
## 0.542068966 0.550344828 0.554482759 0.558620690 0.565517241 0.572413793 
##        66.5        66.6        66.7        66.8        66.9          67 
## 0.577931034 0.583448276 0.584827586 0.587586207 0.593103448 0.594482759 
##        67.1        67.2        67.3        67.4        67.5        67.6 
## 0.597241379 0.601379310 0.606896552 0.612413793 0.622068966 0.627586207 
##        67.7        67.8        67.9          68        68.1        68.2 
## 0.634482759 0.638620690 0.641379310 0.646896552 0.652413793 0.659310345 
##        68.3        68.4        68.5        68.6        68.7        68.8 
## 0.663448276 0.668965517 0.670344828 0.678620690 0.682758621 0.688275862 
##        68.9          69        69.1        69.2        69.3        69.4 
## 0.692413793 0.697931034 0.702068966 0.706206897 0.715862069 0.724137931 
##        69.6        69.7        69.8        69.9          70        70.1 
## 0.726896552 0.732413793 0.735172414 0.739310345 0.742068966 0.744827586 
##        70.2        70.3        70.4        70.5        70.6        70.8 
## 0.748965517 0.750344828 0.755862069 0.761379310 0.764137931 0.766896552 
##        70.9          71        71.1        71.2        71.3        71.4 
## 0.773793103 0.779310345 0.784827586 0.791724138 0.794482759 0.800000000 
##        71.5        71.6        71.7        71.8        71.9          72 
## 0.805517241 0.809655172 0.812413793 0.816551724 0.823448276 0.827586207 
##        72.1        72.2        72.3        72.4        72.5        72.6 
## 0.828965517 0.833103448 0.834482759 0.840000000 0.846896552 0.849655172 
##        72.7        72.8        72.9          73        73.1        73.2 
## 0.851034483 0.853793103 0.856551724 0.859310345 0.863448276 0.864827586 
##        73.3        73.4        73.5        73.6        73.7        73.8 
## 0.868965517 0.871724138 0.881379310 0.886896552 0.889655172 0.892413793 
##        73.9          74        74.1        74.2        74.3        74.4 
## 0.896551724 0.902068966 0.903448276 0.908965517 0.911724138 0.914482759 
##        74.5        74.6        74.7        74.8        74.9          75 
## 0.915862069 0.918620690 0.921379310 0.922758621 0.926896552 0.928275862 
##        75.1        75.2        75.3        75.4        75.5        75.6 
## 0.929655172 0.932413793 0.933793103 0.936551724 0.940689655 0.943448276 
##        75.7        75.8        75.9          76        76.1        76.2 
## 0.948965517 0.953103448 0.954482759 0.955862069 0.957241379 0.960000000 
##        76.3        76.4        76.5        76.6        76.8        76.9 
## 0.962758621 0.964137931 0.965517241 0.968275862 0.971034483 0.973793103 
##        77.2        77.4        77.6        77.7          78        78.2 
## 0.975172414 0.976551724 0.977931034 0.979310345 0.980689655 0.982068966 
##        78.4        78.6        78.9        79.1        79.3        79.6 
## 0.984827586 0.986206897 0.988965517 0.990344828 0.991724138 0.994482759 
##        79.8        80.3        80.8        81.8 
## 0.995862069 0.997241379 0.998620690 1.000000000
cumsum(j)
##        no       yes 
## 0.8937931 1.0000000
cumsum(k)
##    female      male 
## 0.4937931 1.0000000
cumsum(l)
##        no       yes 
## 0.7737931 1.0000000

Representacio grafica

hist(a,col = heat.colors(4))

hist(b,col = "Darkgreen")

hist(c,col = "Pink")

hist(d,col = "blue")

hist(e,col = "DarkBlue")

hist(f,col = "red")

hist(g,col = "darkred")

hist(h,col = "yellow")

hist(i,col = "black")

hist(j,col = "lightblue")

hist(k,col = "lightyellow")

hist(l,col = "lightgreen")

print("53494MSQ")
## [1] "53494MSQ"
print("86696FBR")
## [1] "86696FBR"
print("89641QZK")
## [1] "89641QZK"
print("61876FIZ")
## [1] "61876FIZ"