Skip to Content
Regression Analysis with R
book

Regression Analysis with R

by Giuseppe Ciaburro, Pierre Paquay, Manoj Kumar, Shaikh Salamatullah
January 2018
Beginner to intermediate
422 pages
9h 47m
English
Packt Publishing
Content preview from Regression Analysis with R

Treatment of NaN values

Previously we saw that the is.na() function is able to detect both NA and NaN values. In the previous procedure, we removed both. If we analyze the original version of the data frame we can still see some NaN values:

> SampleData       name gender age right wrong1      Emma      F  24    80    202      Liam      M -19    NA    473    Olivia         32    75    254      Noah      M  15    60    405       Ava      F  18    45    556     Mason      M  21    54    467  Isabella      F  28   -19    858     Lucas      M  30    13    879    Sophia      F  26   NaN    3010   Elijah      M 100    98     211      Mia      F  22     5    9512   Oliver      M  NA   NaN    21

The presence of the NaN value is evident. What does this symbol represent? NaN is a symbol indicating that the result of a numeric operation was executed on invalid operands and therefore did not produce any result. Examples are the division by zero ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Quantitative Finance with R

Learning Quantitative Finance with R

PRASHANT VATS, Dr. Param Jeet
R: Data Analysis and Visualization

R: Data Analysis and Visualization

Tony Fischetti, Brett Lantz, Jaynal Abedin, Hrishi V. Mittal, Bater Makhabel, Edina Berlinger, Ferenc Illés, Milán Badics, Ádám Banai, Gergely Daróczi, Barbara Dömötör, Gergely Gabler, Dániel Havran, Péter Juhász, István Margitai, Balázs Márkus, Péter Medvegyev, Julia Molnár, Balázs Árpád Szucs, Ágnes Tuza, Tamás Vadász, Kata Váradi, Ágnes Vidovics-Dancs
Regression Analysis by Example, 4th Edition

Regression Analysis by Example, 4th Edition

Samprit Chatterjee, Ali S. Hadi

Publisher Resources

ISBN: 9781788627306Supplemental Content