#Video 3 #Ejemplo1

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
periodictableofelements<-read.csv("https://gist.githubusercontent.com/GoodmanSciences/c2dd862cd38f21b0ad36b8f96b4bf1ee/raw/1d92663004489a5b6926e944c1b3d9ec5c40900e/Periodic%2520Table%2520of%2520Elements.csv")
periodictableofelements
##     AtomicNumber       Element Symbol AtomicMass NumberofNeutrons
## 1              1      Hydrogen      H      1.007                0
## 2              2        Helium     He      4.002                2
## 3              3       Lithium     Li      6.941                4
## 4              4     Beryllium     Be      9.012                5
## 5              5         Boron      B     10.811                6
## 6              6        Carbon      C     12.011                6
## 7              7      Nitrogen      N     14.007                7
## 8              8        Oxygen      O     15.999                8
## 9              9      Fluorine      F     18.998               10
## 10            10          Neon     Ne     20.180               10
## 11            11        Sodium     Na     22.990               12
## 12            12     Magnesium     Mg     24.305               12
## 13            13      Aluminum     Al     26.982               14
## 14            14       Silicon     Si     28.086               14
## 15            15    Phosphorus      P     30.974               16
## 16            16        Sulfur      S     32.065               16
## 17            17      Chlorine     Cl     35.453               18
## 18            18         Argon     Ar     39.948               22
## 19            19     Potassium      K     39.098               20
## 20            20       Calcium     Ca     40.078               20
## 21            21      Scandium     Sc     44.956               24
## 22            22      Titanium     Ti     47.867               26
## 23            23      Vanadium      V     50.942               28
## 24            24      Chromium     Cr     51.996               28
## 25            25     Manganese     Mn     54.938               30
## 26            26          Iron     Fe     55.845               30
## 27            27        Cobalt     Co     58.933               32
## 28            28        Nickel     Ni     58.693               31
## 29            29        Copper     Cu     63.546               35
## 30            30          Zinc     Zn     65.380               35
## 31            31       Gallium     Ga     69.723               39
## 32            32     Germanium     Ge     72.640               41
## 33            33       Arsenic     As     74.922               42
## 34            34      Selenium     Se     78.960               45
## 35            35       Bromine     Br     79.904               45
## 36            36       Krypton     Kr     83.798               48
## 37            37      Rubidium     Rb     85.468               48
## 38            38     Strontium     Sr     87.620               50
## 39            39       Yttrium      Y     88.906               50
## 40            40     Zirconium     Zr     91.224               51
## 41            41       Niobium     Nb     92.906               52
## 42            42    Molybdenum     Mo     95.960               54
## 43            43    Technetium     Tc     98.000               55
## 44            44     Ruthenium     Ru    101.070               57
## 45            45       Rhodium     Rh    102.906               58
## 46            46     Palladium     Pd    106.420               60
## 47            47        Silver     Ag    107.868               61
## 48            48       Cadmium     Cd    112.411               64
## 49            49        Indium     In    114.818               66
## 50            50           Tin     Sn    118.710               69
## 51            51      Antimony     Sb    121.760               71
## 52            52     Tellurium     Te    127.600               76
## 53            53        Iodine      I    126.904               74
## 54            54         Xenon     Xe    131.293               77
## 55            55        Cesium     Cs    132.905               78
## 56            56        Barium     Ba    137.327               81
## 57            57     Lanthanum     La    138.905               82
## 58            58        Cerium     Ce    140.116               82
## 59            59  Praseodymium     Pr    140.908               82
## 60            60     Neodymium     Nd    144.242               84
## 61            61    Promethium     Pm    145.000               84
## 62            62      Samarium     Sm    150.360               88
## 63            63      Europium     Eu    151.964               89
## 64            64    Gadolinium     Gd    157.250               93
## 65            65       Terbium     Tb    158.925               94
## 66            66    Dysprosium     Dy    162.500               97
## 67            67       Holmium     Ho    164.930               98
## 68            68        Erbium     Er    167.259               99
## 69            69       Thulium     Tm    168.934              100
## 70            70     Ytterbium     Yb    173.054              103
## 71            71      Lutetium     Lu    174.967              104
## 72            72       Hafnium     Hf    178.490              106
## 73            73      Tantalum     Ta    180.948              108
## 74            74       Wolfram      W    183.840              110
## 75            75       Rhenium     Re    186.207              111
## 76            76        Osmium     Os    190.230              114
## 77            77       Iridium     Ir    192.217              115
## 78            78      Platinum     Pt    195.084              117
## 79            79          Gold     Au    196.967              118
## 80            80       Mercury     Hg    200.590              121
## 81            81      Thallium     Tl    204.383              123
## 82            82          Lead     Pb    207.200              125
## 83            83       Bismuth     Bi    208.980              126
## 84            84      Polonium     Po    210.000              126
## 85            85      Astatine     At    210.000              125
## 86            86         Radon     Rn    222.000              136
## 87            87      Francium     Fr    223.000              136
## 88            88        Radium     Ra    226.000              138
## 89            89      Actinium     Ac    227.000              138
## 90            90       Thorium     Th    232.038              142
## 91            91  Protactinium     Pa    231.036              140
## 92            92       Uranium      U    238.029              146
## 93            93     Neptunium     Np    237.000              144
## 94            94     Plutonium     Pu    244.000              150
## 95            95     Americium     Am    243.000              148
## 96            96        Curium     Cm    247.000              151
## 97            97     Berkelium     Bk    247.000              150
## 98            98   Californium     Cf    251.000              153
## 99            99   Einsteinium     Es    252.000              153
## 100          100       Fermium     Fm    257.000              157
## 101          101   Mendelevium     Md    258.000              157
## 102          102      Nobelium     No    259.000              157
## 103          103    Lawrencium     Lr    262.000              159
## 104          104 Rutherfordium     Rf    261.000              157
## 105          105       Dubnium     Db    262.000              157
## 106          106    Seaborgium     Sg    266.000              160
## 107          107       Bohrium     Bh    264.000              157
## 108          108       Hassium     Hs    267.000              159
## 109          109    Meitnerium     Mt    268.000              159
## 110          110 Darmstadtium     Ds     271.000              161
## 111          111  Roentgenium     Rg     272.000              161
## 112          112  Copernicium     Cn     285.000              173
## 113          113      Nihonium     Nh    284.000              171
## 114          114     Flerovium     Fl    289.000              175
## 115          115     Moscovium     Mc    288.000              173
## 116          116   Livermorium     Lv    292.000              176
## 117          117    Tennessine     Ts    295.000              178
## 118          118     Oganesson     Og    294.000              176
##     NumberofProtons NumberofElectrons Period Group      Phase Radioactive
## 1                 1                 1      1     1        gas            
## 2                 2                 2      1    18        gas            
## 3                 3                 3      2     1      solid            
## 4                 4                 4      2     2      solid            
## 5                 5                 5      2    13      solid            
## 6                 6                 6      2    14      solid            
## 7                 7                 7      2    15        gas            
## 8                 8                 8      2    16        gas            
## 9                 9                 9      2    17        gas            
## 10               10                10      2    18        gas            
## 11               11                11      3     1      solid            
## 12               12                12      3     2      solid            
## 13               13                13      3    13      solid            
## 14               14                14      3    14      solid            
## 15               15                15      3    15      solid            
## 16               16                16      3    16      solid            
## 17               17                17      3    17        gas            
## 18               18                18      3    18        gas            
## 19               19                19      4     1      solid            
## 20               20                20      4     2      solid            
## 21               21                21      4     3      solid            
## 22               22                22      4     4      solid            
## 23               23                23      4     5      solid            
## 24               24                24      4     6      solid            
## 25               25                25      4     7      solid            
## 26               26                26      4     8      solid            
## 27               27                27      4     9      solid            
## 28               28                28      4    10      solid            
## 29               29                29      4    11      solid            
## 30               30                30      4    12      solid            
## 31               31                31      4    13      solid            
## 32               32                32      4    14      solid            
## 33               33                33      4    15      solid            
## 34               34                34      4    16      solid            
## 35               35                35      4    17        liq            
## 36               36                36      4    18        gas            
## 37               37                37      5     1      solid            
## 38               38                38      5     2      solid            
## 39               39                39      5     3      solid            
## 40               40                40      5     4      solid            
## 41               41                41      5     5      solid            
## 42               42                42      5     6      solid            
## 43               43                43      5     7 artificial         yes
## 44               44                44      5     8      solid            
## 45               45                45      5     9      solid            
## 46               46                46      5    10      solid            
## 47               47                47      5    11      solid            
## 48               48                48      5    12      solid            
## 49               49                49      5    13      solid            
## 50               50                50      5    14      solid            
## 51               51                51      5    15      solid            
## 52               52                52      5    16      solid            
## 53               53                53      5    17      solid            
## 54               54                54      5    18        gas            
## 55               55                55      6     1      solid            
## 56               56                56      6     2      solid            
## 57               57                57      6     3      solid            
## 58               58                58      6    NA      solid            
## 59               59                59      6    NA      solid            
## 60               60                60      6    NA      solid            
## 61               61                61      6    NA artificial         yes
## 62               62                62      6    NA      solid            
## 63               63                63      6    NA      solid            
## 64               64                64      6    NA      solid            
## 65               65                65      6    NA      solid            
## 66               66                66      6    NA      solid            
## 67               67                67      6    NA      solid            
## 68               68                68      6    NA      solid            
## 69               69                69      6    NA      solid            
## 70               70                70      6    NA      solid            
## 71               71                71      6    NA      solid            
## 72               72                72      6     4      solid            
## 73               73                73      6     5      solid            
## 74               74                74      6     6      solid            
## 75               75                75      6     7      solid            
## 76               76                76      6     8      solid            
## 77               77                77      6     9      solid            
## 78               78                78      6    10      solid            
## 79               79                79      6    11      solid            
## 80               80                80      6    12        liq            
## 81               81                81      6    13      solid            
## 82               82                82      6    14      solid            
## 83               83                83      6    15      solid            
## 84               84                84      6    16      solid         yes
## 85               85                85      6    17      solid         yes
## 86               86                86      6    18        gas         yes
## 87               87                87      7     1      solid         yes
## 88               88                88      7     2      solid         yes
## 89               89                89      7     3      solid         yes
## 90               90                90      7    NA      solid         yes
## 91               91                91      7    NA      solid         yes
## 92               92                92      7    NA      solid         yes
## 93               93                93      7    NA artificial         yes
## 94               94                94      7    NA artificial         yes
## 95               95                95      7    NA artificial         yes
## 96               96                96      7    NA artificial         yes
## 97               97                97      7    NA artificial         yes
## 98               98                98      7    NA artificial         yes
## 99               99                99      7    NA artificial         yes
## 100             100               100      7    NA artificial         yes
## 101             101               101      7    NA artificial         yes
## 102             102               102      7    NA artificial         yes
## 103             103               103      7    NA artificial         yes
## 104             104               104      7     4 artificial         yes
## 105             105               105      7     5 artificial         yes
## 106             106               106      7     6 artificial         yes
## 107             107               107      7     7 artificial         yes
## 108             108               108      7     8 artificial         yes
## 109             109               109      7     9 artificial         yes
## 110             110               110      7    10 artificial         yes
## 111             111               111      7    11 artificial         yes
## 112             112               112      7    12 artificial         yes
## 113             113               113      7    13 artificial         yes
## 114             114               114      7    14 artificial         yes
## 115             115               115      7    15 artificial         yes
## 116             116               116      7    16 artificial         yes
## 117             117               117      7    17 artificial         yes
## 118             118               118      7    18 artificial         yes
##     Natural Metal Nonmetal Metalloid                 Type AtomicRadius
## 1       yes            yes                       Nonmetal         0.79
## 2       yes            yes                      Noble Gas         0.49
## 3       yes   yes                            Alkali Metal         2.10
## 4       yes   yes                    Alkaline Earth Metal         1.40
## 5       yes                      yes            Metalloid         1.20
## 6       yes            yes                       Nonmetal         0.91
## 7       yes            yes                       Nonmetal         0.75
## 8       yes            yes                       Nonmetal         0.65
## 9       yes            yes                        Halogen         0.57
## 10      yes            yes                      Noble Gas         0.51
## 11      yes   yes                            Alkali Metal         2.20
## 12      yes   yes                    Alkaline Earth Metal         1.70
## 13      yes   yes                                   Metal         1.80
## 14      yes                      yes            Metalloid         1.50
## 15      yes            yes                       Nonmetal         1.20
## 16      yes            yes                       Nonmetal         1.10
## 17      yes            yes                        Halogen         0.97
## 18      yes            yes                      Noble Gas         0.88
## 19      yes   yes                            Alkali Metal         2.80
## 20      yes   yes                    Alkaline Earth Metal         2.20
## 21      yes   yes                        Transition Metal         2.10
## 22      yes   yes                        Transition Metal         2.00
## 23      yes   yes                        Transition Metal         1.90
## 24      yes   yes                        Transition Metal         1.90
## 25      yes   yes                        Transition Metal         1.80
## 26      yes   yes                        Transition Metal         1.70
## 27      yes   yes                        Transition Metal         1.70
## 28      yes   yes                        Transition Metal         1.60
## 29      yes   yes                        Transition Metal         1.60
## 30      yes   yes                        Transition Metal         1.50
## 31      yes   yes                                   Metal         1.80
## 32      yes                      yes            Metalloid         1.50
## 33      yes                      yes            Metalloid         1.30
## 34      yes            yes                       Nonmetal         1.20
## 35      yes            yes                        Halogen         1.10
## 36      yes            yes                      Noble Gas         1.00
## 37      yes   yes                            Alkali Metal         3.00
## 38      yes   yes                    Alkaline Earth Metal         2.50
## 39      yes   yes                        Transition Metal         2.30
## 40      yes   yes                        Transition Metal         2.20
## 41      yes   yes                        Transition Metal         2.10
## 42      yes   yes                        Transition Metal         2.00
## 43            yes                        Transition Metal         2.00
## 44      yes   yes                        Transition Metal         1.90
## 45      yes   yes                        Transition Metal         1.80
## 46      yes   yes                        Transition Metal         1.80
## 47      yes   yes                        Transition Metal         1.80
## 48      yes   yes                        Transition Metal         1.70
## 49      yes   yes                                   Metal         2.00
## 50      yes   yes                                   Metal         1.70
## 51      yes                      yes            Metalloid         1.50
## 52      yes                      yes            Metalloid         1.40
## 53      yes            yes                        Halogen         1.30
## 54      yes            yes                      Noble Gas         1.20
## 55      yes   yes                            Alkali Metal         3.30
## 56      yes   yes                    Alkaline Earth Metal         2.80
## 57      yes   yes                              Lanthanide         2.70
## 58      yes   yes                              Lanthanide         2.70
## 59      yes   yes                              Lanthanide         2.70
## 60      yes   yes                              Lanthanide         2.60
## 61            yes                              Lanthanide         2.60
## 62      yes   yes                              Lanthanide         2.60
## 63      yes   yes                              Lanthanide         2.60
## 64      yes   yes                              Lanthanide         2.50
## 65      yes   yes                              Lanthanide         2.50
## 66      yes   yes                              Lanthanide         2.50
## 67      yes   yes                              Lanthanide         2.50
## 68      yes   yes                              Lanthanide         2.50
## 69      yes   yes                              Lanthanide         2.40
## 70      yes   yes                              Lanthanide         2.40
## 71      yes   yes                              Lanthanide         2.30
## 72      yes   yes                        Transition Metal         2.20
## 73      yes   yes                        Transition Metal         2.10
## 74      yes   yes                        Transition Metal         2.00
## 75      yes   yes                        Transition Metal         2.00
## 76      yes   yes                        Transition Metal         1.90
## 77      yes   yes                        Transition Metal         1.90
## 78      yes   yes                        Transition Metal         1.80
## 79      yes   yes                        Transition Metal         1.80
## 80      yes   yes                        Transition Metal         1.80
## 81      yes   yes                                   Metal         2.10
## 82      yes   yes                                   Metal         1.80
## 83      yes   yes                                   Metal         1.60
## 84      yes                      yes            Metalloid         1.50
## 85      yes            yes                      Noble Gas         1.40
## 86      yes   yes                            Alkali Metal         1.30
## 87      yes   yes                    Alkaline Earth Metal           NA
## 88      yes   yes                                Actinide           NA
## 89      yes   yes                                Actinide           NA
## 90      yes   yes                                Actinide           NA
## 91      yes   yes                                Actinide           NA
## 92      yes   yes                                Actinide           NA
## 93            yes                                Actinide           NA
## 94            yes                                Actinide           NA
## 95            yes                                Actinide           NA
## 96            yes                                Actinide           NA
## 97            yes                                Actinide           NA
## 98            yes                                Actinide           NA
## 99            yes                                Actinide           NA
## 100           yes                                Actinide           NA
## 101           yes                                Actinide           NA
## 102           yes                                Actinide           NA
## 103           yes                                Actinide           NA
## 104           yes                           Transactinide           NA
## 105           yes                           Transactinide           NA
## 106           yes                           Transactinide           NA
## 107           yes                           Transactinide           NA
## 108           yes                           Transactinide           NA
## 109           yes                           Transactinide           NA
## 110           yes                           Transactinide           NA
## 111           yes                           Transactinide           NA
## 112           yes                           Transactinide           NA
## 113           yes                                                   NA
## 114           yes                           Transactinide           NA
## 115           yes                                                   NA
## 116           yes                           Transactinide           NA
## 117                    yes                                          NA
## 118                    yes                      Noble Gas           NA
##     Electronegativity FirstIonization  Density MeltingPoint BoilingPoint
## 1                2.20         13.5984 8.99e-05       14.175        20.28
## 2                  NA         24.5874 1.79e-04           NA         4.22
## 3                0.98          5.3917 5.34e-01      453.850      1615.00
## 4                1.57          9.3227 1.85e+00     1560.150      2742.00
## 5                2.04          8.2980 2.34e+00     2573.150      4200.00
## 6                2.55         11.2603 2.27e+00     3948.150      4300.00
## 7                3.04         14.5341 1.25e-03       63.290        77.36
## 8                3.44         13.6181 1.43e-03       50.500        90.20
## 9                3.98         17.4228 1.70e-03       53.630        85.03
## 10                 NA         21.5645 9.00e-04       24.703        27.07
## 11               0.93          5.1391 9.71e-01      371.150      1156.00
## 12               1.31          7.6462 1.74e+00      923.150      1363.00
## 13               1.61          5.9858 2.70e+00      933.400      2792.00
## 14               1.90          8.1517 2.33e+00     1683.150      3538.00
## 15               2.19         10.4867 1.82e+00      317.250       553.00
## 16               2.58         10.3600 2.07e+00      388.510       717.80
## 17               3.16         12.9676 3.21e-03      172.310       239.11
## 18                 NA         15.7596 1.78e-03       83.960        87.30
## 19               0.82          4.3407 8.62e-01      336.500      1032.00
## 20               1.00          6.1132 1.54e+00     1112.150      1757.00
## 21               1.36          6.5615 2.99e+00     1812.150      3109.00
## 22               1.54          6.8281 4.54e+00     1933.150      3560.00
## 23               1.63          6.7462 6.11e+00     2175.150      3680.00
## 24               1.66          6.7665 7.15e+00     2130.150      2944.00
## 25               1.55          7.4340 7.44e+00     1519.150      2334.00
## 26               1.83          7.9024 7.87e+00     1808.150      3134.00
## 27               1.88          7.8810 8.86e+00     1768.150      3200.00
## 28               1.91          7.6398 8.91e+00     1726.150      3186.00
## 29               1.90          7.7264 8.96e+00     1357.750      2835.00
## 30               1.65          9.3942 7.13e+00      692.880      1180.00
## 31               1.81          5.9993 5.91e+00      302.910      2477.00
## 32               2.01          7.8994 5.32e+00     1211.450      3106.00
## 33               2.18          9.7886 5.78e+00     1090.150       887.00
## 34               2.55          9.7524 4.81e+00      494.150       958.00
## 35               2.96         11.8138 3.12e+00      266.050       332.00
## 36                 NA         13.9996 3.73e-03      115.930       119.93
## 37               0.82          4.1771 1.53e+00      312.790       961.00
## 38               0.95          5.6949 2.64e+00     1042.150      1655.00
## 39               1.22          6.2173 4.47e+00     1799.150      3609.00
## 40               1.33          6.6339 6.51e+00     2125.150      4682.00
## 41               1.60          6.7589 8.57e+00     2741.150      5017.00
## 42               2.16          7.0924 1.02e+01     2890.150      4912.00
## 43               1.90          7.2800 1.15e+01     2473.150      5150.00
## 44               2.20          7.3605 1.24e+01     2523.150      4423.00
## 45               2.28          7.4589 1.24e+01     2239.150      3968.00
## 46               2.20          8.3369 1.20e+01     1825.150      3236.00
## 47               1.93          7.5762 1.05e+01     1234.150      2435.00
## 48               1.69          8.9938 8.69e+00      594.330      1040.00
## 49               1.78          5.7864 7.31e+00      429.910      2345.00
## 50               1.96          7.3439 7.29e+00      505.210      2875.00
## 51               2.05          8.6084 6.69e+00      904.050      1860.00
## 52               2.10          9.0096 6.23e+00      722.800      1261.00
## 53               2.66         10.4513 4.93e+00      386.650       457.40
## 54                 NA         12.1298 5.89e-03      161.450       165.03
## 55               0.79          3.8939 1.87e+00      301.700       944.00
## 56               0.89          5.2117 3.59e+00     1002.150      2170.00
## 57               1.10          5.5769 6.15e+00     1193.150      3737.00
## 58               1.12          5.5387 6.77e+00     1071.150      3716.00
## 59               1.13          5.4730 6.77e+00     1204.150      3793.00
## 60               1.14          5.5250 7.01e+00     1289.150      3347.00
## 61               1.13          5.5820 7.26e+00     1204.150      3273.00
## 62               1.17          5.6437 7.52e+00     1345.150      2067.00
## 63               1.20          5.6704 5.24e+00     1095.150      1802.00
## 64               1.20          6.1501 7.90e+00     1585.150      3546.00
## 65               1.20          5.8638 8.23e+00     1630.150      3503.00
## 66               1.22          5.9389 8.55e+00     1680.150      2840.00
## 67               1.23          6.0215 8.80e+00     1743.150      2993.00
## 68               1.24          6.1077 9.07e+00     1795.150      3503.00
## 69               1.25          6.1843 9.32e+00     1818.150      2223.00
## 70               1.10          6.2542 6.97e+00     1097.150      1469.00
## 71               1.27          5.4259 9.84e+00     1936.150      3675.00
## 72               1.30          6.8251 1.33e+01     2500.150      4876.00
## 73               1.50          7.5496 1.67e+01     3269.150      5731.00
## 74               2.36          7.8640 1.93e+01     3680.150      5828.00
## 75               1.90          7.8335 2.10e+01     3453.150      5869.00
## 76               2.20          8.4382 2.26e+01     3300.150      5285.00
## 77               2.20          8.9670 2.26e+01     2716.150      4701.00
## 78               2.28          8.9587 2.15e+01     2045.150      4098.00
## 79               2.54          9.2255 1.93e+01     1337.730      3129.00
## 80               2.00         10.4375 1.35e+01      234.430       630.00
## 81               2.04          6.1082 1.19e+01      577.150      1746.00
## 82               2.33          7.4167 1.13e+01      600.750      2022.00
## 83               2.02          7.2856 9.81e+00      544.670      1837.00
## 84               2.00          8.4170 9.32e+00      527.150      1235.00
## 85               2.20          9.3000 7.00e+00      575.150       610.00
## 86                 NA         10.7485 9.73e-03      202.150       211.30
## 87               0.70          4.0727 1.87e+00      300.150       950.00
## 88               0.90          5.2784 5.50e+00      973.150      2010.00
## 89               1.10          5.1700 1.01e+01     1323.150      3471.00
## 90               1.30          6.3067 1.17e+01     2028.150      5061.00
## 91               1.50          5.8900 1.54e+01     1873.150      4300.00
## 92               1.38          6.1941 1.90e+01     1405.150      4404.00
## 93               1.36          6.2657 2.05e+01      913.150      4273.00
## 94               1.28          6.0262 1.98e+01      913.150      3501.00
## 95               1.30          5.9738 1.37e+01     1267.150      2880.00
## 96               1.30          5.9915 1.35e+01     1340.150      3383.00
## 97               1.30          6.1979 1.48e+01     1259.150       983.00
## 98               1.30          6.2817 1.51e+01     1925.150      1173.00
## 99               1.30          6.4200 1.35e+01     1133.150           NA
## 100              1.30          6.5000       NA           NA           NA
## 101              1.30          6.5800       NA           NA           NA
## 102              1.30          6.6500       NA           NA           NA
## 103                NA              NA       NA           NA           NA
## 104                NA              NA 1.81e+01           NA           NA
## 105                NA              NA 3.90e+01           NA           NA
## 106                NA              NA 3.50e+01           NA           NA
## 107                NA              NA 3.70e+01           NA           NA
## 108                NA              NA 4.10e+01           NA           NA
## 109                NA              NA 3.50e+01           NA           NA
## 110                NA              NA       NA           NA           NA
## 111                NA              NA       NA           NA           NA
## 112                NA              NA       NA           NA           NA
## 113                NA              NA       NA           NA           NA
## 114                NA              NA       NA           NA           NA
## 115                NA              NA       NA           NA           NA
## 116                NA              NA       NA           NA           NA
## 117                NA              NA       NA           NA           NA
## 118                NA              NA       NA           NA           NA
##     NumberOfIsotopes                   Discoverer Year SpecificHeat
## 1                  3                    Cavendish 1766       14.304
## 2                  5                      Janssen 1868        5.193
## 3                  5                    Arfvedson 1817        3.582
## 4                  6                   Vaulquelin 1798        1.825
## 5                  6                   Gay-Lussac 1808        1.026
## 6                  7                  Prehistoric   NA        0.709
## 7                  8                   Rutherford 1772        1.040
## 8                  8            Priestley/Scheele 1774        0.918
## 9                  6                      Moissan 1886        0.824
## 10                 8           Ramsay and Travers 1898        1.030
## 11                 7                         Davy 1807        1.228
## 12                 8                        Black 1755        1.023
## 13                 8                       Wshler 1827        0.897
## 14                 8                    Berzelius 1824        0.705
## 15                 7                    BranBrand 1669        0.769
## 16                10                  Prehistoric   NA        0.710
## 17                11                      Scheele 1774        0.479
## 18                 8          Rayleigh and Ramsay 1894        0.520
## 19                10                         Davy 1807        0.757
## 20                14                         Davy 1808        0.647
## 21                15                       Nilson 1878        0.568
## 22                 9                       Gregor 1791        0.523
## 23                 9                      del Rio 1801        0.489
## 24                 9                    Vauquelin 1797        0.449
## 25                11                Gahn, Scheele 1774        0.479
## 26                10                  Prehistoric   NA        0.449
## 27                14                       Brandt 1735        0.421
## 28                11                    Cronstedt 1751        0.444
## 29                11                  Prehistoric   NA        0.385
## 30                15                  Prehistoric   NA        0.388
## 31                14               de Boisbaudran 1875        0.371
## 32                17                      Winkler 1886        0.320
## 33                14              Albertus Magnus 1250        0.329
## 34                20                    Berzelius 1817        0.321
## 35                19                       Balard 1826        0.474
## 36                23           Ramsay and Travers 1898        0.248
## 37                20          Bunsen and Kirchoff 1861        0.363
## 38                18                         Davy 1808        0.301
## 39                21                      Gadolin 1794        0.298
## 40                20                     Klaproth 1789        0.278
## 41                24                     Hatchett 1801        0.265
## 42                20                      Scheele 1778        0.251
## 43                23            Perrier and Segr� 1937           NA
## 44                16                        Klaus 1844        0.238
## 45                20                    Wollaston 1803        0.243
## 46                21                    Wollaston 1803        0.244
## 47                27                  Prehistoric   NA        0.235
## 48                22                    Stromeyer 1817        0.232
## 49                34            Reich and Richter 1863        0.233
## 50                28                  Prehistoric   NA        0.228
## 51                29         Early historic times   NA        0.207
## 52                29             von Reichenstein 1782        0.202
## 53                24                     Courtois 1811        0.214
## 54                31           Ramsay and Travers 1898        0.158
## 55                22          Bunsen and Kirchoff 1860        0.242
## 56                25                         Davy 1808        0.204
## 57                19                     Mosander 1839        0.195
## 58                19                    Berzelius 1803        0.192
## 59                15                 von Welsbach 1885        0.193
## 60                16                 von Welsbach 1885        0.190
## 61                14              Marinsky et al. 1945           NA
## 62                17                  Boisbaudran 1879        0.197
## 63                21                     Demarcay 1901        0.182
## 64                17                  de Marignac 1880        0.236
## 65                24                     Mosander 1843        0.182
## 66                21               de Boisbaudran 1886        0.170
## 67                29       Delafontaine and Soret 1878        0.165
## 68                16                     Mosander 1843        0.168
## 69                18                        Cleve 1879        0.160
## 70                16                     Marignac 1878        0.155
## 71                22         Urbain/ von Welsbach 1907        0.154
## 72                17        Coster and von Hevesy 1923        0.144
## 73                19                      Ekeberg 1801        0.140
## 74                22          J. and F. d'Elhuyar 1783        0.132
## 75                21     Noddack, Berg, and Tacke 1925        0.137
## 76                19                      Tennant 1803        0.130
## 77                25                      Tennant 1804        0.131
## 78                32                   Ulloa/Wood 1735        0.133
## 79                21                  Prehistoric   NA        0.129
## 80                26                  Prehistoric   NA        0.140
## 81                28                      Crookes 1861        0.129
## 82                29                  Prehistoric   NA        0.129
## 83                19         Geoffroy the Younger 1753        0.122
## 84                34                        Curie 1898           NA
## 85                21                Corson et al. 1940           NA
## 86                20                         Dorn 1900        0.094
## 87                21                        Perey 1939           NA
## 88                15       Pierre and Marie Curie 1898           NA
## 89                11              Debierne/Giesel 1899        0.120
## 90                12                    Berzelius 1828        0.113
## 91                14             Hahn and Meitner 1917           NA
## 92                15                      Peligot 1841        0.116
## 93               153         McMillan and Abelson 1940           NA
## 94               163               Seaborg et al. 1940           NA
## 95               133               Seaborg et al. 1944           NA
## 96               133               Seaborg et al. 1944           NA
## 97                83               Seaborg et al. 1949           NA
## 98               123               Seaborg et al. 1950           NA
## 99               123               Ghiorso et al. 1952           NA
## 100              103               Ghiorso et al. 1953           NA
## 101               33               Ghiorso et al. 1955           NA
## 102               73               Ghiorso et al. 1958           NA
## 103              203               Ghiorso et al. 1961           NA
## 104               NA               Ghiorso et al. 1969           NA
## 105               NA               Ghiorso et al. 1970           NA
## 106               NA               Ghiorso et al. 1974           NA
## 107               NA    Armbruster and M�nzenberg 1981           NA
## 108               NA    Armbruster and M�nzenberg 1983           NA
## 109               NA GSI, Darmstadt, West Germany 1982           NA
## 110               NA                              1994           NA
## 111               NA                              1994           NA
## 112               NA                              1996           NA
## 113               NA                              2004           NA
## 114               NA                              1999           NA
## 115               NA                              2010           NA
## 116               NA                              2000           NA
## 117               NA                              2010           NA
## 118               NA                              2006           NA
##     NumberofShells NumberofValence
## 1                1               1
## 2                1              NA
## 3                2               1
## 4                2               2
## 5                2               3
## 6                2               4
## 7                2               5
## 8                2               6
## 9                2               7
## 10               2               8
## 11               3               1
## 12               3               2
## 13               3               3
## 14               3               4
## 15               3               5
## 16               3               6
## 17               3               7
## 18               3               8
## 19               4               1
## 20               4               2
## 21               4              NA
## 22               4              NA
## 23               4              NA
## 24               4              NA
## 25               4              NA
## 26               4              NA
## 27               4              NA
## 28               4              NA
## 29               4              NA
## 30               4              NA
## 31               4               3
## 32               4               4
## 33               4               5
## 34               4               6
## 35               4               7
## 36               4               8
## 37               5               1
## 38               5               2
## 39               5              NA
## 40               5              NA
## 41               5              NA
## 42               5              NA
## 43               5              NA
## 44               5              NA
## 45               5              NA
## 46               5              NA
## 47               5              NA
## 48               5              NA
## 49               5               3
## 50               5               4
## 51               5               5
## 52               5               6
## 53               5               7
## 54               5               8
## 55               6               1
## 56               6               2
## 57               6              NA
## 58               6              NA
## 59               6              NA
## 60               6              NA
## 61               6              NA
## 62               6              NA
## 63               6              NA
## 64               6              NA
## 65               6              NA
## 66               6              NA
## 67               6              NA
## 68               6              NA
## 69               6              NA
## 70               6              NA
## 71               6              NA
## 72               6              NA
## 73               6              NA
## 74               6              NA
## 75               6              NA
## 76               6              NA
## 77               6              NA
## 78               6              NA
## 79               6              NA
## 80               6              NA
## 81               6               3
## 82               6               4
## 83               6               5
## 84               6               6
## 85               6               7
## 86               6               8
## 87               7               1
## 88               7               2
## 89               7              NA
## 90               7              NA
## 91               7              NA
## 92               7              NA
## 93               7              NA
## 94               7              NA
## 95               7              NA
## 96               7              NA
## 97               7              NA
## 98               7              NA
## 99               7              NA
## 100              7              NA
## 101              7              NA
## 102              7              NA
## 103              7              NA
## 104              7              NA
## 105              7              NA
## 106              7              NA
## 107              7              NA
## 108              7              NA
## 109              7              NA
## 110              7              NA
## 111              7              NA
## 112              7              NA
## 113              7               3
## 114              7               4
## 115              7               5
## 116              7               6
## 117              7               7
## 118              7               8
periodictableofelements %>% filter(Phase=="gas")
##    AtomicNumber  Element Symbol AtomicMass NumberofNeutrons NumberofProtons
## 1             1 Hydrogen      H      1.007                0               1
## 2             2   Helium     He      4.002                2               2
## 3             7 Nitrogen      N     14.007                7               7
## 4             8   Oxygen      O     15.999                8               8
## 5             9 Fluorine      F     18.998               10               9
## 6            10     Neon     Ne     20.180               10              10
## 7            17 Chlorine     Cl     35.453               18              17
## 8            18    Argon     Ar     39.948               22              18
## 9            36  Krypton     Kr     83.798               48              36
## 10           54    Xenon     Xe    131.293               77              54
## 11           86    Radon     Rn    222.000              136              86
##    NumberofElectrons Period Group Phase Radioactive Natural Metal Nonmetal
## 1                  1      1     1   gas                 yes            yes
## 2                  2      1    18   gas                 yes            yes
## 3                  7      2    15   gas                 yes            yes
## 4                  8      2    16   gas                 yes            yes
## 5                  9      2    17   gas                 yes            yes
## 6                 10      2    18   gas                 yes            yes
## 7                 17      3    17   gas                 yes            yes
## 8                 18      3    18   gas                 yes            yes
## 9                 36      4    18   gas                 yes            yes
## 10                54      5    18   gas                 yes            yes
## 11                86      6    18   gas         yes     yes   yes         
##    Metalloid         Type AtomicRadius Electronegativity FirstIonization
## 1                Nonmetal         0.79              2.20         13.5984
## 2               Noble Gas         0.49                NA         24.5874
## 3                Nonmetal         0.75              3.04         14.5341
## 4                Nonmetal         0.65              3.44         13.6181
## 5                 Halogen         0.57              3.98         17.4228
## 6               Noble Gas         0.51                NA         21.5645
## 7                 Halogen         0.97              3.16         12.9676
## 8               Noble Gas         0.88                NA         15.7596
## 9               Noble Gas         1.00                NA         13.9996
## 10              Noble Gas         1.20                NA         12.1298
## 11           Alkali Metal         1.30                NA         10.7485
##     Density MeltingPoint BoilingPoint NumberOfIsotopes          Discoverer Year
## 1  8.99e-05       14.175        20.28                3           Cavendish 1766
## 2  1.79e-04           NA         4.22                5             Janssen 1868
## 3  1.25e-03       63.290        77.36                8          Rutherford 1772
## 4  1.43e-03       50.500        90.20                8   Priestley/Scheele 1774
## 5  1.70e-03       53.630        85.03                6             Moissan 1886
## 6  9.00e-04       24.703        27.07                8  Ramsay and Travers 1898
## 7  3.21e-03      172.310       239.11               11             Scheele 1774
## 8  1.78e-03       83.960        87.30                8 Rayleigh and Ramsay 1894
## 9  3.73e-03      115.930       119.93               23  Ramsay and Travers 1898
## 10 5.89e-03      161.450       165.03               31  Ramsay and Travers 1898
## 11 9.73e-03      202.150       211.30               20                Dorn 1900
##    SpecificHeat NumberofShells NumberofValence
## 1        14.304              1               1
## 2         5.193              1              NA
## 3         1.040              2               5
## 4         0.918              2               6
## 5         0.824              2               7
## 6         1.030              2               8
## 7         0.479              3               7
## 8         0.520              3               8
## 9         0.248              4               8
## 10        0.158              5               8
## 11        0.094              6               8
df
## function (x, df1, df2, ncp, log = FALSE) 
## {
##     if (missing(ncp)) 
##         .Call(C_df, x, df1, df2, log)
##     else .Call(C_dnf, x, df1, df2, ncp, log)
## }
## <bytecode: 0x12902ab88>
## <environment: namespace:stats>
df2<-periodictableofelements%>% mutate(promedio=(NumberofNeutrons+NumberofProtons)/2)
df2
##     AtomicNumber       Element Symbol AtomicMass NumberofNeutrons
## 1              1      Hydrogen      H      1.007                0
## 2              2        Helium     He      4.002                2
## 3              3       Lithium     Li      6.941                4
## 4              4     Beryllium     Be      9.012                5
## 5              5         Boron      B     10.811                6
## 6              6        Carbon      C     12.011                6
## 7              7      Nitrogen      N     14.007                7
## 8              8        Oxygen      O     15.999                8
## 9              9      Fluorine      F     18.998               10
## 10            10          Neon     Ne     20.180               10
## 11            11        Sodium     Na     22.990               12
## 12            12     Magnesium     Mg     24.305               12
## 13            13      Aluminum     Al     26.982               14
## 14            14       Silicon     Si     28.086               14
## 15            15    Phosphorus      P     30.974               16
## 16            16        Sulfur      S     32.065               16
## 17            17      Chlorine     Cl     35.453               18
## 18            18         Argon     Ar     39.948               22
## 19            19     Potassium      K     39.098               20
## 20            20       Calcium     Ca     40.078               20
## 21            21      Scandium     Sc     44.956               24
## 22            22      Titanium     Ti     47.867               26
## 23            23      Vanadium      V     50.942               28
## 24            24      Chromium     Cr     51.996               28
## 25            25     Manganese     Mn     54.938               30
## 26            26          Iron     Fe     55.845               30
## 27            27        Cobalt     Co     58.933               32
## 28            28        Nickel     Ni     58.693               31
## 29            29        Copper     Cu     63.546               35
## 30            30          Zinc     Zn     65.380               35
## 31            31       Gallium     Ga     69.723               39
## 32            32     Germanium     Ge     72.640               41
## 33            33       Arsenic     As     74.922               42
## 34            34      Selenium     Se     78.960               45
## 35            35       Bromine     Br     79.904               45
## 36            36       Krypton     Kr     83.798               48
## 37            37      Rubidium     Rb     85.468               48
## 38            38     Strontium     Sr     87.620               50
## 39            39       Yttrium      Y     88.906               50
## 40            40     Zirconium     Zr     91.224               51
## 41            41       Niobium     Nb     92.906               52
## 42            42    Molybdenum     Mo     95.960               54
## 43            43    Technetium     Tc     98.000               55
## 44            44     Ruthenium     Ru    101.070               57
## 45            45       Rhodium     Rh    102.906               58
## 46            46     Palladium     Pd    106.420               60
## 47            47        Silver     Ag    107.868               61
## 48            48       Cadmium     Cd    112.411               64
## 49            49        Indium     In    114.818               66
## 50            50           Tin     Sn    118.710               69
## 51            51      Antimony     Sb    121.760               71
## 52            52     Tellurium     Te    127.600               76
## 53            53        Iodine      I    126.904               74
## 54            54         Xenon     Xe    131.293               77
## 55            55        Cesium     Cs    132.905               78
## 56            56        Barium     Ba    137.327               81
## 57            57     Lanthanum     La    138.905               82
## 58            58        Cerium     Ce    140.116               82
## 59            59  Praseodymium     Pr    140.908               82
## 60            60     Neodymium     Nd    144.242               84
## 61            61    Promethium     Pm    145.000               84
## 62            62      Samarium     Sm    150.360               88
## 63            63      Europium     Eu    151.964               89
## 64            64    Gadolinium     Gd    157.250               93
## 65            65       Terbium     Tb    158.925               94
## 66            66    Dysprosium     Dy    162.500               97
## 67            67       Holmium     Ho    164.930               98
## 68            68        Erbium     Er    167.259               99
## 69            69       Thulium     Tm    168.934              100
## 70            70     Ytterbium     Yb    173.054              103
## 71            71      Lutetium     Lu    174.967              104
## 72            72       Hafnium     Hf    178.490              106
## 73            73      Tantalum     Ta    180.948              108
## 74            74       Wolfram      W    183.840              110
## 75            75       Rhenium     Re    186.207              111
## 76            76        Osmium     Os    190.230              114
## 77            77       Iridium     Ir    192.217              115
## 78            78      Platinum     Pt    195.084              117
## 79            79          Gold     Au    196.967              118
## 80            80       Mercury     Hg    200.590              121
## 81            81      Thallium     Tl    204.383              123
## 82            82          Lead     Pb    207.200              125
## 83            83       Bismuth     Bi    208.980              126
## 84            84      Polonium     Po    210.000              126
## 85            85      Astatine     At    210.000              125
## 86            86         Radon     Rn    222.000              136
## 87            87      Francium     Fr    223.000              136
## 88            88        Radium     Ra    226.000              138
## 89            89      Actinium     Ac    227.000              138
## 90            90       Thorium     Th    232.038              142
## 91            91  Protactinium     Pa    231.036              140
## 92            92       Uranium      U    238.029              146
## 93            93     Neptunium     Np    237.000              144
## 94            94     Plutonium     Pu    244.000              150
## 95            95     Americium     Am    243.000              148
## 96            96        Curium     Cm    247.000              151
## 97            97     Berkelium     Bk    247.000              150
## 98            98   Californium     Cf    251.000              153
## 99            99   Einsteinium     Es    252.000              153
## 100          100       Fermium     Fm    257.000              157
## 101          101   Mendelevium     Md    258.000              157
## 102          102      Nobelium     No    259.000              157
## 103          103    Lawrencium     Lr    262.000              159
## 104          104 Rutherfordium     Rf    261.000              157
## 105          105       Dubnium     Db    262.000              157
## 106          106    Seaborgium     Sg    266.000              160
## 107          107       Bohrium     Bh    264.000              157
## 108          108       Hassium     Hs    267.000              159
## 109          109    Meitnerium     Mt    268.000              159
## 110          110 Darmstadtium     Ds     271.000              161
## 111          111  Roentgenium     Rg     272.000              161
## 112          112  Copernicium     Cn     285.000              173
## 113          113      Nihonium     Nh    284.000              171
## 114          114     Flerovium     Fl    289.000              175
## 115          115     Moscovium     Mc    288.000              173
## 116          116   Livermorium     Lv    292.000              176
## 117          117    Tennessine     Ts    295.000              178
## 118          118     Oganesson     Og    294.000              176
##     NumberofProtons NumberofElectrons Period Group      Phase Radioactive
## 1                 1                 1      1     1        gas            
## 2                 2                 2      1    18        gas            
## 3                 3                 3      2     1      solid            
## 4                 4                 4      2     2      solid            
## 5                 5                 5      2    13      solid            
## 6                 6                 6      2    14      solid            
## 7                 7                 7      2    15        gas            
## 8                 8                 8      2    16        gas            
## 9                 9                 9      2    17        gas            
## 10               10                10      2    18        gas            
## 11               11                11      3     1      solid            
## 12               12                12      3     2      solid            
## 13               13                13      3    13      solid            
## 14               14                14      3    14      solid            
## 15               15                15      3    15      solid            
## 16               16                16      3    16      solid            
## 17               17                17      3    17        gas            
## 18               18                18      3    18        gas            
## 19               19                19      4     1      solid            
## 20               20                20      4     2      solid            
## 21               21                21      4     3      solid            
## 22               22                22      4     4      solid            
## 23               23                23      4     5      solid            
## 24               24                24      4     6      solid            
## 25               25                25      4     7      solid            
## 26               26                26      4     8      solid            
## 27               27                27      4     9      solid            
## 28               28                28      4    10      solid            
## 29               29                29      4    11      solid            
## 30               30                30      4    12      solid            
## 31               31                31      4    13      solid            
## 32               32                32      4    14      solid            
## 33               33                33      4    15      solid            
## 34               34                34      4    16      solid            
## 35               35                35      4    17        liq            
## 36               36                36      4    18        gas            
## 37               37                37      5     1      solid            
## 38               38                38      5     2      solid            
## 39               39                39      5     3      solid            
## 40               40                40      5     4      solid            
## 41               41                41      5     5      solid            
## 42               42                42      5     6      solid            
## 43               43                43      5     7 artificial         yes
## 44               44                44      5     8      solid            
## 45               45                45      5     9      solid            
## 46               46                46      5    10      solid            
## 47               47                47      5    11      solid            
## 48               48                48      5    12      solid            
## 49               49                49      5    13      solid            
## 50               50                50      5    14      solid            
## 51               51                51      5    15      solid            
## 52               52                52      5    16      solid            
## 53               53                53      5    17      solid            
## 54               54                54      5    18        gas            
## 55               55                55      6     1      solid            
## 56               56                56      6     2      solid            
## 57               57                57      6     3      solid            
## 58               58                58      6    NA      solid            
## 59               59                59      6    NA      solid            
## 60               60                60      6    NA      solid            
## 61               61                61      6    NA artificial         yes
## 62               62                62      6    NA      solid            
## 63               63                63      6    NA      solid            
## 64               64                64      6    NA      solid            
## 65               65                65      6    NA      solid            
## 66               66                66      6    NA      solid            
## 67               67                67      6    NA      solid            
## 68               68                68      6    NA      solid            
## 69               69                69      6    NA      solid            
## 70               70                70      6    NA      solid            
## 71               71                71      6    NA      solid            
## 72               72                72      6     4      solid            
## 73               73                73      6     5      solid            
## 74               74                74      6     6      solid            
## 75               75                75      6     7      solid            
## 76               76                76      6     8      solid            
## 77               77                77      6     9      solid            
## 78               78                78      6    10      solid            
## 79               79                79      6    11      solid            
## 80               80                80      6    12        liq            
## 81               81                81      6    13      solid            
## 82               82                82      6    14      solid            
## 83               83                83      6    15      solid            
## 84               84                84      6    16      solid         yes
## 85               85                85      6    17      solid         yes
## 86               86                86      6    18        gas         yes
## 87               87                87      7     1      solid         yes
## 88               88                88      7     2      solid         yes
## 89               89                89      7     3      solid         yes
## 90               90                90      7    NA      solid         yes
## 91               91                91      7    NA      solid         yes
## 92               92                92      7    NA      solid         yes
## 93               93                93      7    NA artificial         yes
## 94               94                94      7    NA artificial         yes
## 95               95                95      7    NA artificial         yes
## 96               96                96      7    NA artificial         yes
## 97               97                97      7    NA artificial         yes
## 98               98                98      7    NA artificial         yes
## 99               99                99      7    NA artificial         yes
## 100             100               100      7    NA artificial         yes
## 101             101               101      7    NA artificial         yes
## 102             102               102      7    NA artificial         yes
## 103             103               103      7    NA artificial         yes
## 104             104               104      7     4 artificial         yes
## 105             105               105      7     5 artificial         yes
## 106             106               106      7     6 artificial         yes
## 107             107               107      7     7 artificial         yes
## 108             108               108      7     8 artificial         yes
## 109             109               109      7     9 artificial         yes
## 110             110               110      7    10 artificial         yes
## 111             111               111      7    11 artificial         yes
## 112             112               112      7    12 artificial         yes
## 113             113               113      7    13 artificial         yes
## 114             114               114      7    14 artificial         yes
## 115             115               115      7    15 artificial         yes
## 116             116               116      7    16 artificial         yes
## 117             117               117      7    17 artificial         yes
## 118             118               118      7    18 artificial         yes
##     Natural Metal Nonmetal Metalloid                 Type AtomicRadius
## 1       yes            yes                       Nonmetal         0.79
## 2       yes            yes                      Noble Gas         0.49
## 3       yes   yes                            Alkali Metal         2.10
## 4       yes   yes                    Alkaline Earth Metal         1.40
## 5       yes                      yes            Metalloid         1.20
## 6       yes            yes                       Nonmetal         0.91
## 7       yes            yes                       Nonmetal         0.75
## 8       yes            yes                       Nonmetal         0.65
## 9       yes            yes                        Halogen         0.57
## 10      yes            yes                      Noble Gas         0.51
## 11      yes   yes                            Alkali Metal         2.20
## 12      yes   yes                    Alkaline Earth Metal         1.70
## 13      yes   yes                                   Metal         1.80
## 14      yes                      yes            Metalloid         1.50
## 15      yes            yes                       Nonmetal         1.20
## 16      yes            yes                       Nonmetal         1.10
## 17      yes            yes                        Halogen         0.97
## 18      yes            yes                      Noble Gas         0.88
## 19      yes   yes                            Alkali Metal         2.80
## 20      yes   yes                    Alkaline Earth Metal         2.20
## 21      yes   yes                        Transition Metal         2.10
## 22      yes   yes                        Transition Metal         2.00
## 23      yes   yes                        Transition Metal         1.90
## 24      yes   yes                        Transition Metal         1.90
## 25      yes   yes                        Transition Metal         1.80
## 26      yes   yes                        Transition Metal         1.70
## 27      yes   yes                        Transition Metal         1.70
## 28      yes   yes                        Transition Metal         1.60
## 29      yes   yes                        Transition Metal         1.60
## 30      yes   yes                        Transition Metal         1.50
## 31      yes   yes                                   Metal         1.80
## 32      yes                      yes            Metalloid         1.50
## 33      yes                      yes            Metalloid         1.30
## 34      yes            yes                       Nonmetal         1.20
## 35      yes            yes                        Halogen         1.10
## 36      yes            yes                      Noble Gas         1.00
## 37      yes   yes                            Alkali Metal         3.00
## 38      yes   yes                    Alkaline Earth Metal         2.50
## 39      yes   yes                        Transition Metal         2.30
## 40      yes   yes                        Transition Metal         2.20
## 41      yes   yes                        Transition Metal         2.10
## 42      yes   yes                        Transition Metal         2.00
## 43            yes                        Transition Metal         2.00
## 44      yes   yes                        Transition Metal         1.90
## 45      yes   yes                        Transition Metal         1.80
## 46      yes   yes                        Transition Metal         1.80
## 47      yes   yes                        Transition Metal         1.80
## 48      yes   yes                        Transition Metal         1.70
## 49      yes   yes                                   Metal         2.00
## 50      yes   yes                                   Metal         1.70
## 51      yes                      yes            Metalloid         1.50
## 52      yes                      yes            Metalloid         1.40
## 53      yes            yes                        Halogen         1.30
## 54      yes            yes                      Noble Gas         1.20
## 55      yes   yes                            Alkali Metal         3.30
## 56      yes   yes                    Alkaline Earth Metal         2.80
## 57      yes   yes                              Lanthanide         2.70
## 58      yes   yes                              Lanthanide         2.70
## 59      yes   yes                              Lanthanide         2.70
## 60      yes   yes                              Lanthanide         2.60
## 61            yes                              Lanthanide         2.60
## 62      yes   yes                              Lanthanide         2.60
## 63      yes   yes                              Lanthanide         2.60
## 64      yes   yes                              Lanthanide         2.50
## 65      yes   yes                              Lanthanide         2.50
## 66      yes   yes                              Lanthanide         2.50
## 67      yes   yes                              Lanthanide         2.50
## 68      yes   yes                              Lanthanide         2.50
## 69      yes   yes                              Lanthanide         2.40
## 70      yes   yes                              Lanthanide         2.40
## 71      yes   yes                              Lanthanide         2.30
## 72      yes   yes                        Transition Metal         2.20
## 73      yes   yes                        Transition Metal         2.10
## 74      yes   yes                        Transition Metal         2.00
## 75      yes   yes                        Transition Metal         2.00
## 76      yes   yes                        Transition Metal         1.90
## 77      yes   yes                        Transition Metal         1.90
## 78      yes   yes                        Transition Metal         1.80
## 79      yes   yes                        Transition Metal         1.80
## 80      yes   yes                        Transition Metal         1.80
## 81      yes   yes                                   Metal         2.10
## 82      yes   yes                                   Metal         1.80
## 83      yes   yes                                   Metal         1.60
## 84      yes                      yes            Metalloid         1.50
## 85      yes            yes                      Noble Gas         1.40
## 86      yes   yes                            Alkali Metal         1.30
## 87      yes   yes                    Alkaline Earth Metal           NA
## 88      yes   yes                                Actinide           NA
## 89      yes   yes                                Actinide           NA
## 90      yes   yes                                Actinide           NA
## 91      yes   yes                                Actinide           NA
## 92      yes   yes                                Actinide           NA
## 93            yes                                Actinide           NA
## 94            yes                                Actinide           NA
## 95            yes                                Actinide           NA
## 96            yes                                Actinide           NA
## 97            yes                                Actinide           NA
## 98            yes                                Actinide           NA
## 99            yes                                Actinide           NA
## 100           yes                                Actinide           NA
## 101           yes                                Actinide           NA
## 102           yes                                Actinide           NA
## 103           yes                                Actinide           NA
## 104           yes                           Transactinide           NA
## 105           yes                           Transactinide           NA
## 106           yes                           Transactinide           NA
## 107           yes                           Transactinide           NA
## 108           yes                           Transactinide           NA
## 109           yes                           Transactinide           NA
## 110           yes                           Transactinide           NA
## 111           yes                           Transactinide           NA
## 112           yes                           Transactinide           NA
## 113           yes                                                   NA
## 114           yes                           Transactinide           NA
## 115           yes                                                   NA
## 116           yes                           Transactinide           NA
## 117                    yes                                          NA
## 118                    yes                      Noble Gas           NA
##     Electronegativity FirstIonization  Density MeltingPoint BoilingPoint
## 1                2.20         13.5984 8.99e-05       14.175        20.28
## 2                  NA         24.5874 1.79e-04           NA         4.22
## 3                0.98          5.3917 5.34e-01      453.850      1615.00
## 4                1.57          9.3227 1.85e+00     1560.150      2742.00
## 5                2.04          8.2980 2.34e+00     2573.150      4200.00
## 6                2.55         11.2603 2.27e+00     3948.150      4300.00
## 7                3.04         14.5341 1.25e-03       63.290        77.36
## 8                3.44         13.6181 1.43e-03       50.500        90.20
## 9                3.98         17.4228 1.70e-03       53.630        85.03
## 10                 NA         21.5645 9.00e-04       24.703        27.07
## 11               0.93          5.1391 9.71e-01      371.150      1156.00
## 12               1.31          7.6462 1.74e+00      923.150      1363.00
## 13               1.61          5.9858 2.70e+00      933.400      2792.00
## 14               1.90          8.1517 2.33e+00     1683.150      3538.00
## 15               2.19         10.4867 1.82e+00      317.250       553.00
## 16               2.58         10.3600 2.07e+00      388.510       717.80
## 17               3.16         12.9676 3.21e-03      172.310       239.11
## 18                 NA         15.7596 1.78e-03       83.960        87.30
## 19               0.82          4.3407 8.62e-01      336.500      1032.00
## 20               1.00          6.1132 1.54e+00     1112.150      1757.00
## 21               1.36          6.5615 2.99e+00     1812.150      3109.00
## 22               1.54          6.8281 4.54e+00     1933.150      3560.00
## 23               1.63          6.7462 6.11e+00     2175.150      3680.00
## 24               1.66          6.7665 7.15e+00     2130.150      2944.00
## 25               1.55          7.4340 7.44e+00     1519.150      2334.00
## 26               1.83          7.9024 7.87e+00     1808.150      3134.00
## 27               1.88          7.8810 8.86e+00     1768.150      3200.00
## 28               1.91          7.6398 8.91e+00     1726.150      3186.00
## 29               1.90          7.7264 8.96e+00     1357.750      2835.00
## 30               1.65          9.3942 7.13e+00      692.880      1180.00
## 31               1.81          5.9993 5.91e+00      302.910      2477.00
## 32               2.01          7.8994 5.32e+00     1211.450      3106.00
## 33               2.18          9.7886 5.78e+00     1090.150       887.00
## 34               2.55          9.7524 4.81e+00      494.150       958.00
## 35               2.96         11.8138 3.12e+00      266.050       332.00
## 36                 NA         13.9996 3.73e-03      115.930       119.93
## 37               0.82          4.1771 1.53e+00      312.790       961.00
## 38               0.95          5.6949 2.64e+00     1042.150      1655.00
## 39               1.22          6.2173 4.47e+00     1799.150      3609.00
## 40               1.33          6.6339 6.51e+00     2125.150      4682.00
## 41               1.60          6.7589 8.57e+00     2741.150      5017.00
## 42               2.16          7.0924 1.02e+01     2890.150      4912.00
## 43               1.90          7.2800 1.15e+01     2473.150      5150.00
## 44               2.20          7.3605 1.24e+01     2523.150      4423.00
## 45               2.28          7.4589 1.24e+01     2239.150      3968.00
## 46               2.20          8.3369 1.20e+01     1825.150      3236.00
## 47               1.93          7.5762 1.05e+01     1234.150      2435.00
## 48               1.69          8.9938 8.69e+00      594.330      1040.00
## 49               1.78          5.7864 7.31e+00      429.910      2345.00
## 50               1.96          7.3439 7.29e+00      505.210      2875.00
## 51               2.05          8.6084 6.69e+00      904.050      1860.00
## 52               2.10          9.0096 6.23e+00      722.800      1261.00
## 53               2.66         10.4513 4.93e+00      386.650       457.40
## 54                 NA         12.1298 5.89e-03      161.450       165.03
## 55               0.79          3.8939 1.87e+00      301.700       944.00
## 56               0.89          5.2117 3.59e+00     1002.150      2170.00
## 57               1.10          5.5769 6.15e+00     1193.150      3737.00
## 58               1.12          5.5387 6.77e+00     1071.150      3716.00
## 59               1.13          5.4730 6.77e+00     1204.150      3793.00
## 60               1.14          5.5250 7.01e+00     1289.150      3347.00
## 61               1.13          5.5820 7.26e+00     1204.150      3273.00
## 62               1.17          5.6437 7.52e+00     1345.150      2067.00
## 63               1.20          5.6704 5.24e+00     1095.150      1802.00
## 64               1.20          6.1501 7.90e+00     1585.150      3546.00
## 65               1.20          5.8638 8.23e+00     1630.150      3503.00
## 66               1.22          5.9389 8.55e+00     1680.150      2840.00
## 67               1.23          6.0215 8.80e+00     1743.150      2993.00
## 68               1.24          6.1077 9.07e+00     1795.150      3503.00
## 69               1.25          6.1843 9.32e+00     1818.150      2223.00
## 70               1.10          6.2542 6.97e+00     1097.150      1469.00
## 71               1.27          5.4259 9.84e+00     1936.150      3675.00
## 72               1.30          6.8251 1.33e+01     2500.150      4876.00
## 73               1.50          7.5496 1.67e+01     3269.150      5731.00
## 74               2.36          7.8640 1.93e+01     3680.150      5828.00
## 75               1.90          7.8335 2.10e+01     3453.150      5869.00
## 76               2.20          8.4382 2.26e+01     3300.150      5285.00
## 77               2.20          8.9670 2.26e+01     2716.150      4701.00
## 78               2.28          8.9587 2.15e+01     2045.150      4098.00
## 79               2.54          9.2255 1.93e+01     1337.730      3129.00
## 80               2.00         10.4375 1.35e+01      234.430       630.00
## 81               2.04          6.1082 1.19e+01      577.150      1746.00
## 82               2.33          7.4167 1.13e+01      600.750      2022.00
## 83               2.02          7.2856 9.81e+00      544.670      1837.00
## 84               2.00          8.4170 9.32e+00      527.150      1235.00
## 85               2.20          9.3000 7.00e+00      575.150       610.00
## 86                 NA         10.7485 9.73e-03      202.150       211.30
## 87               0.70          4.0727 1.87e+00      300.150       950.00
## 88               0.90          5.2784 5.50e+00      973.150      2010.00
## 89               1.10          5.1700 1.01e+01     1323.150      3471.00
## 90               1.30          6.3067 1.17e+01     2028.150      5061.00
## 91               1.50          5.8900 1.54e+01     1873.150      4300.00
## 92               1.38          6.1941 1.90e+01     1405.150      4404.00
## 93               1.36          6.2657 2.05e+01      913.150      4273.00
## 94               1.28          6.0262 1.98e+01      913.150      3501.00
## 95               1.30          5.9738 1.37e+01     1267.150      2880.00
## 96               1.30          5.9915 1.35e+01     1340.150      3383.00
## 97               1.30          6.1979 1.48e+01     1259.150       983.00
## 98               1.30          6.2817 1.51e+01     1925.150      1173.00
## 99               1.30          6.4200 1.35e+01     1133.150           NA
## 100              1.30          6.5000       NA           NA           NA
## 101              1.30          6.5800       NA           NA           NA
## 102              1.30          6.6500       NA           NA           NA
## 103                NA              NA       NA           NA           NA
## 104                NA              NA 1.81e+01           NA           NA
## 105                NA              NA 3.90e+01           NA           NA
## 106                NA              NA 3.50e+01           NA           NA
## 107                NA              NA 3.70e+01           NA           NA
## 108                NA              NA 4.10e+01           NA           NA
## 109                NA              NA 3.50e+01           NA           NA
## 110                NA              NA       NA           NA           NA
## 111                NA              NA       NA           NA           NA
## 112                NA              NA       NA           NA           NA
## 113                NA              NA       NA           NA           NA
## 114                NA              NA       NA           NA           NA
## 115                NA              NA       NA           NA           NA
## 116                NA              NA       NA           NA           NA
## 117                NA              NA       NA           NA           NA
## 118                NA              NA       NA           NA           NA
##     NumberOfIsotopes                   Discoverer Year SpecificHeat
## 1                  3                    Cavendish 1766       14.304
## 2                  5                      Janssen 1868        5.193
## 3                  5                    Arfvedson 1817        3.582
## 4                  6                   Vaulquelin 1798        1.825
## 5                  6                   Gay-Lussac 1808        1.026
## 6                  7                  Prehistoric   NA        0.709
## 7                  8                   Rutherford 1772        1.040
## 8                  8            Priestley/Scheele 1774        0.918
## 9                  6                      Moissan 1886        0.824
## 10                 8           Ramsay and Travers 1898        1.030
## 11                 7                         Davy 1807        1.228
## 12                 8                        Black 1755        1.023
## 13                 8                       Wshler 1827        0.897
## 14                 8                    Berzelius 1824        0.705
## 15                 7                    BranBrand 1669        0.769
## 16                10                  Prehistoric   NA        0.710
## 17                11                      Scheele 1774        0.479
## 18                 8          Rayleigh and Ramsay 1894        0.520
## 19                10                         Davy 1807        0.757
## 20                14                         Davy 1808        0.647
## 21                15                       Nilson 1878        0.568
## 22                 9                       Gregor 1791        0.523
## 23                 9                      del Rio 1801        0.489
## 24                 9                    Vauquelin 1797        0.449
## 25                11                Gahn, Scheele 1774        0.479
## 26                10                  Prehistoric   NA        0.449
## 27                14                       Brandt 1735        0.421
## 28                11                    Cronstedt 1751        0.444
## 29                11                  Prehistoric   NA        0.385
## 30                15                  Prehistoric   NA        0.388
## 31                14               de Boisbaudran 1875        0.371
## 32                17                      Winkler 1886        0.320
## 33                14              Albertus Magnus 1250        0.329
## 34                20                    Berzelius 1817        0.321
## 35                19                       Balard 1826        0.474
## 36                23           Ramsay and Travers 1898        0.248
## 37                20          Bunsen and Kirchoff 1861        0.363
## 38                18                         Davy 1808        0.301
## 39                21                      Gadolin 1794        0.298
## 40                20                     Klaproth 1789        0.278
## 41                24                     Hatchett 1801        0.265
## 42                20                      Scheele 1778        0.251
## 43                23            Perrier and Segr� 1937           NA
## 44                16                        Klaus 1844        0.238
## 45                20                    Wollaston 1803        0.243
## 46                21                    Wollaston 1803        0.244
## 47                27                  Prehistoric   NA        0.235
## 48                22                    Stromeyer 1817        0.232
## 49                34            Reich and Richter 1863        0.233
## 50                28                  Prehistoric   NA        0.228
## 51                29         Early historic times   NA        0.207
## 52                29             von Reichenstein 1782        0.202
## 53                24                     Courtois 1811        0.214
## 54                31           Ramsay and Travers 1898        0.158
## 55                22          Bunsen and Kirchoff 1860        0.242
## 56                25                         Davy 1808        0.204
## 57                19                     Mosander 1839        0.195
## 58                19                    Berzelius 1803        0.192
## 59                15                 von Welsbach 1885        0.193
## 60                16                 von Welsbach 1885        0.190
## 61                14              Marinsky et al. 1945           NA
## 62                17                  Boisbaudran 1879        0.197
## 63                21                     Demarcay 1901        0.182
## 64                17                  de Marignac 1880        0.236
## 65                24                     Mosander 1843        0.182
## 66                21               de Boisbaudran 1886        0.170
## 67                29       Delafontaine and Soret 1878        0.165
## 68                16                     Mosander 1843        0.168
## 69                18                        Cleve 1879        0.160
## 70                16                     Marignac 1878        0.155
## 71                22         Urbain/ von Welsbach 1907        0.154
## 72                17        Coster and von Hevesy 1923        0.144
## 73                19                      Ekeberg 1801        0.140
## 74                22          J. and F. d'Elhuyar 1783        0.132
## 75                21     Noddack, Berg, and Tacke 1925        0.137
## 76                19                      Tennant 1803        0.130
## 77                25                      Tennant 1804        0.131
## 78                32                   Ulloa/Wood 1735        0.133
## 79                21                  Prehistoric   NA        0.129
## 80                26                  Prehistoric   NA        0.140
## 81                28                      Crookes 1861        0.129
## 82                29                  Prehistoric   NA        0.129
## 83                19         Geoffroy the Younger 1753        0.122
## 84                34                        Curie 1898           NA
## 85                21                Corson et al. 1940           NA
## 86                20                         Dorn 1900        0.094
## 87                21                        Perey 1939           NA
## 88                15       Pierre and Marie Curie 1898           NA
## 89                11              Debierne/Giesel 1899        0.120
## 90                12                    Berzelius 1828        0.113
## 91                14             Hahn and Meitner 1917           NA
## 92                15                      Peligot 1841        0.116
## 93               153         McMillan and Abelson 1940           NA
## 94               163               Seaborg et al. 1940           NA
## 95               133               Seaborg et al. 1944           NA
## 96               133               Seaborg et al. 1944           NA
## 97                83               Seaborg et al. 1949           NA
## 98               123               Seaborg et al. 1950           NA
## 99               123               Ghiorso et al. 1952           NA
## 100              103               Ghiorso et al. 1953           NA
## 101               33               Ghiorso et al. 1955           NA
## 102               73               Ghiorso et al. 1958           NA
## 103              203               Ghiorso et al. 1961           NA
## 104               NA               Ghiorso et al. 1969           NA
## 105               NA               Ghiorso et al. 1970           NA
## 106               NA               Ghiorso et al. 1974           NA
## 107               NA    Armbruster and M�nzenberg 1981           NA
## 108               NA    Armbruster and M�nzenberg 1983           NA
## 109               NA GSI, Darmstadt, West Germany 1982           NA
## 110               NA                              1994           NA
## 111               NA                              1994           NA
## 112               NA                              1996           NA
## 113               NA                              2004           NA
## 114               NA                              1999           NA
## 115               NA                              2010           NA
## 116               NA                              2000           NA
## 117               NA                              2010           NA
## 118               NA                              2006           NA
##     NumberofShells NumberofValence promedio
## 1                1               1      0.5
## 2                1              NA      2.0
## 3                2               1      3.5
## 4                2               2      4.5
## 5                2               3      5.5
## 6                2               4      6.0
## 7                2               5      7.0
## 8                2               6      8.0
## 9                2               7      9.5
## 10               2               8     10.0
## 11               3               1     11.5
## 12               3               2     12.0
## 13               3               3     13.5
## 14               3               4     14.0
## 15               3               5     15.5
## 16               3               6     16.0
## 17               3               7     17.5
## 18               3               8     20.0
## 19               4               1     19.5
## 20               4               2     20.0
## 21               4              NA     22.5
## 22               4              NA     24.0
## 23               4              NA     25.5
## 24               4              NA     26.0
## 25               4              NA     27.5
## 26               4              NA     28.0
## 27               4              NA     29.5
## 28               4              NA     29.5
## 29               4              NA     32.0
## 30               4              NA     32.5
## 31               4               3     35.0
## 32               4               4     36.5
## 33               4               5     37.5
## 34               4               6     39.5
## 35               4               7     40.0
## 36               4               8     42.0
## 37               5               1     42.5
## 38               5               2     44.0
## 39               5              NA     44.5
## 40               5              NA     45.5
## 41               5              NA     46.5
## 42               5              NA     48.0
## 43               5              NA     49.0
## 44               5              NA     50.5
## 45               5              NA     51.5
## 46               5              NA     53.0
## 47               5              NA     54.0
## 48               5              NA     56.0
## 49               5               3     57.5
## 50               5               4     59.5
## 51               5               5     61.0
## 52               5               6     64.0
## 53               5               7     63.5
## 54               5               8     65.5
## 55               6               1     66.5
## 56               6               2     68.5
## 57               6              NA     69.5
## 58               6              NA     70.0
## 59               6              NA     70.5
## 60               6              NA     72.0
## 61               6              NA     72.5
## 62               6              NA     75.0
## 63               6              NA     76.0
## 64               6              NA     78.5
## 65               6              NA     79.5
## 66               6              NA     81.5
## 67               6              NA     82.5
## 68               6              NA     83.5
## 69               6              NA     84.5
## 70               6              NA     86.5
## 71               6              NA     87.5
## 72               6              NA     89.0
## 73               6              NA     90.5
## 74               6              NA     92.0
## 75               6              NA     93.0
## 76               6              NA     95.0
## 77               6              NA     96.0
## 78               6              NA     97.5
## 79               6              NA     98.5
## 80               6              NA    100.5
## 81               6               3    102.0
## 82               6               4    103.5
## 83               6               5    104.5
## 84               6               6    105.0
## 85               6               7    105.0
## 86               6               8    111.0
## 87               7               1    111.5
## 88               7               2    113.0
## 89               7              NA    113.5
## 90               7              NA    116.0
## 91               7              NA    115.5
## 92               7              NA    119.0
## 93               7              NA    118.5
## 94               7              NA    122.0
## 95               7              NA    121.5
## 96               7              NA    123.5
## 97               7              NA    123.5
## 98               7              NA    125.5
## 99               7              NA    126.0
## 100              7              NA    128.5
## 101              7              NA    129.0
## 102              7              NA    129.5
## 103              7              NA    131.0
## 104              7              NA    130.5
## 105              7              NA    131.0
## 106              7              NA    133.0
## 107              7              NA    132.0
## 108              7              NA    133.5
## 109              7              NA    134.0
## 110              7              NA    135.5
## 111              7              NA    136.0
## 112              7              NA    142.5
## 113              7               3    142.0
## 114              7               4    144.5
## 115              7               5    144.0
## 116              7               6    146.0
## 117              7               7    147.5
## 118              7               8    147.0
df3<-periodictableofelements %>% group_by(Type) %>% summarize(n=n(),promedio=mean(NumberofProtons),std=sd(NumberofElectrons))
df3 
## # A tibble: 12 Ă— 4
##    Type                       n promedio   std
##    <chr>                  <int>    <dbl> <dbl>
##  1 ""                         3    115    2   
##  2 "Actinide"                16     95.5  4.76
##  3 "Alkali Metal"             6     35.2 31.2 
##  4 "Alkaline Earth Metal"     6     36.2 31.2 
##  5 "Halogen"                  4     28.5 19.6 
##  6 "Lanthanide"              15     64    4.47
##  7 "Metal"                    7     55.6 27.7 
##  8 "Metalloid"                7     38.7 26.5 
##  9 "Noble Gas"                7     46.1 42.6 
## 10 "Nonmetal"                 7     12.4 10.8 
## 11 "Transactinide"           11    109.   3.77
## 12 "Transition Metal"        29     47.4 21.2
plot(periodictableofelements$MeltingPoint,periodictableofelements$BoilingPoint,col="orange")

#Video 3 #Ejemplo2

library(dplyr)
planets<-read.csv("https://gist.githubusercontent.com/fusion0202/23624d74061c4236587447f4a97761af/raw/75c80179590249c7bd3c8f966c5d2b2d221b6c64/planets.csv")
planets
##      Name Diameter         Mass Inclination Eccentricity Semi_majorAxis
## 1 Mercury   4879.4  3.302Ă—10^23     7.00400   0.20563593      0.3870993
## 2   Venus  12103.6  4.869Ă—10^24     3.39471   0.00677672      0.7233357
## 3   Earth  12756.3  5.974Ă—10^24     0.00005   0.01671123      1.0000026
## 4    Mars   6794.4  6.419Ă—10^23     1.85061   0.09339410      1.5237103
## 5 Jupiter 142984.0  1.899Ă—10^27     1.30530   0.04838624      5.2028870
## 6  Saturn 120536.0  5.688Ă—10^26     2.48446   0.05386179      9.5366759
## 7  Uranus  51118.0  8.683Ă—10^25     0.77400   0.04725744     19.1891646
## 8 Neptune  49572.0  1.024Ă—10^26     1.76917   0.00859048     30.0699228
## 9   Pluto   2370.0    1.3Ă—10^22    17.08900   0.25024871     39.4450697
##   SurfaceGravity OrbitalPeriod SiderealRotation Satellites
## 1           3.70        0.2410        58.650000          0
## 2           8.87        0.6150       243.018700          0
## 3           9.78        1.0000         0.997271          1
## 4           3.71        1.8810         1.025950          2
## 5          24.79       11.8600         0.413500         63
## 6           8.96       29.4600         0.426400         64
## 7           7.77       84.0100         0.718100         27
## 8          11.00      164.7900         0.671200         14
## 9           0.62      247.7407         6.387230          5
planets %>% filter(SurfaceGravity > 3.71)
##      Name Diameter         Mass Inclination Eccentricity Semi_majorAxis
## 1   Venus  12103.6  4.869Ă—10^24     3.39471   0.00677672      0.7233357
## 2   Earth  12756.3  5.974Ă—10^24     0.00005   0.01671123      1.0000026
## 3 Jupiter 142984.0  1.899Ă—10^27     1.30530   0.04838624      5.2028870
## 4  Saturn 120536.0  5.688Ă—10^26     2.48446   0.05386179      9.5366759
## 5  Uranus  51118.0  8.683Ă—10^25     0.77400   0.04725744     19.1891646
## 6 Neptune  49572.0  1.024Ă—10^26     1.76917   0.00859048     30.0699228
##   SurfaceGravity OrbitalPeriod SiderealRotation Satellites
## 1           8.87         0.615       243.018700          0
## 2           9.78         1.000         0.997271          1
## 3          24.79        11.860         0.413500         63
## 4           8.96        29.460         0.426400         64
## 5           7.77        84.010         0.718100         27
## 6          11.00       164.790         0.671200         14
df
## function (x, df1, df2, ncp, log = FALSE) 
## {
##     if (missing(ncp)) 
##         .Call(C_df, x, df1, df2, log)
##     else .Call(C_dnf, x, df1, df2, ncp, log)
## }
## <bytecode: 0x12902ab88>
## <environment: namespace:stats>
df4<-planets%>% mutate(promedio=(suma=Diameter+Inclination)/2)
df4
##      Name Diameter         Mass Inclination Eccentricity Semi_majorAxis
## 1 Mercury   4879.4  3.302Ă—10^23     7.00400   0.20563593      0.3870993
## 2   Venus  12103.6  4.869Ă—10^24     3.39471   0.00677672      0.7233357
## 3   Earth  12756.3  5.974Ă—10^24     0.00005   0.01671123      1.0000026
## 4    Mars   6794.4  6.419Ă—10^23     1.85061   0.09339410      1.5237103
## 5 Jupiter 142984.0  1.899Ă—10^27     1.30530   0.04838624      5.2028870
## 6  Saturn 120536.0  5.688Ă—10^26     2.48446   0.05386179      9.5366759
## 7  Uranus  51118.0  8.683Ă—10^25     0.77400   0.04725744     19.1891646
## 8 Neptune  49572.0  1.024Ă—10^26     1.76917   0.00859048     30.0699228
## 9   Pluto   2370.0    1.3Ă—10^22    17.08900   0.25024871     39.4450697
##   SurfaceGravity OrbitalPeriod SiderealRotation Satellites  promedio
## 1           3.70        0.2410        58.650000          0  2443.202
## 2           8.87        0.6150       243.018700          0  6053.497
## 3           9.78        1.0000         0.997271          1  6378.150
## 4           3.71        1.8810         1.025950          2  3398.125
## 5          24.79       11.8600         0.413500         63 71492.653
## 6           8.96       29.4600         0.426400         64 60269.242
## 7           7.77       84.0100         0.718100         27 25559.387
## 8          11.00      164.7900         0.671200         14 24786.885
## 9           0.62      247.7407         6.387230          5  1193.545
df6<-planets %>% group_by(OrbitalPeriod) %>% summarize(n=n(),promedio=mean(Inclination),std=sd(SurfaceGravity))
df6  
## # A tibble: 9 Ă— 4
##   OrbitalPeriod     n promedio   std
##           <dbl> <int>    <dbl> <dbl>
## 1         0.241     1  7.00       NA
## 2         0.615     1  3.39       NA
## 3         1         1  0.00005    NA
## 4         1.88      1  1.85       NA
## 5        11.9       1  1.31       NA
## 6        29.5       1  2.48       NA
## 7        84.0       1  0.774      NA
## 8       165.        1  1.77       NA
## 9       248.        1 17.1        NA
plot(planets$Diameter,planets$Inclination,col="purple")