Blog

How to Solve R Error in lm.fit: na/nan/inf

This error occurs when trying to fit a linear regression model in R using the lm() function but either the predictor or response variables contain Not a Number (NaN) or infinity (Inf) values. You can solve this error by replacing the NaN and Inf values with NA values,...

read more

How to Solve R Error: Unexpected else

This error occurs if you put the else statement on a new line after an if statement. R interprets the if statement as complete and does not expect an else. You can solve this error by enclosing the entire if/else statement in braces/curly brackets {} or put the else...

read more
Profile Picture
Senior Advisor, Data Science | [email protected] | + posts

Suf is a senior advisor in data science with deep expertise in Natural Language Processing, Complex Networks, and Anomaly Detection. Formerly a postdoctoral research fellow, he applied advanced physics techniques to tackle real-world, data-heavy industry challenges. Before that, he was a particle physicist at the ATLAS Experiment of the Large Hadron Collider. Now, he’s focused on bringing more fun and curiosity to the world of science and research online.