Neil deGrasse Tyson is seeing the error of his ways.

Twitter users slammed the celebrity astrophysicist Sunday after he posted a tweet about the recent shootings in El Paso, Texas, and Dayton, Ohio, that many thought missed the mark.

"In the past 48hrs, the USA horrifically lost 34 people to mass shootings," Tyson wrote, claiming, "on average, across any 48hrs, we also lose… 500 to Medical errors 300 to the Flu 250 to Suicide 200 to Car Accidents 40 to Homicide via Handgun."

"Often our emotions respond more to spectacle than to data," he added.

He posted a note to Facebook Monday, acknowledging his mistake.

"My intent was to offer objectively true information that might help shape conversations and reactions to preventable ways we die," his note read. "Where I miscalculated was that I genuinely believed the Tweet would be helpful to anyone trying to save lives in America. What I learned from the range of reactions is that for many people, some information –-my Tweet in particular -- can be true but unhelpful, especially at a time when many people are either still in shock, or trying to heal – or both.

"So if you are one of those people, I apologize for not knowing in advance what effect my Tweet could have on you," he continued. "I am therefore thankful for the candor and depth of critical reactions shared in my Twitter feed. As an educator, I personally value knowing with precision and accuracy what reaction anything that I say (or write) will instill in my audience, and I got this one wrong."

Shootings this weekend in El Paso and Dayton left at least 29 dead and 52 injured in less than 24 hours. Users flooded Twitter with responses to Tyson's tweet, criticizing the scientist for belittling the attacks in the name of providing data.

"Making a didactic if factually accurate point does not always equate to intelligent or productive discourse," journalist Andrew Baggarly responded. "And this was neither intelligent nor productive. Disappointed to read this from you."

"Imagine tweeting this and thinking it adds anything to intelligent discourse," added science writer Shaena Montanari.

Many also criticized Tyson for downplaying the emotional scarring and unnecessary devastation of the attacks.

"Can you also please quantify how fear affects our society's ability to function? Or the impact these deaths have on the family, friends and communities of the victims? Or how it can inspire more acts?" wrote Twitter user @MrJapen, slamming Tyson for a "hot garbage comparison."

"I think motive, avoidability and culpability are all forms of data that have perfectly logical emotional ramifications," added Washington Post opinion writer Elizabeth Bruenig. "You'd be angrier if somebody shot your kid than if your kid died of typhus, this is obvious and rational."

"I know you're trying to math people here, but this is tasteless and disrespectful," wrote user @teafortat. "Lost all respect for you."

Others wondered why Tyson had to compare one cause of death to others.

"I'm just gonna throw this out there - what if all of those were bad and preventing any of them is good?" comedy writer Mike Drucker tweeted.

"My father died of a medical error earlier this year," Netflix movie director Ted Geoghegan replied to Tyson. "I’ve lost numerous friends to suicide. My family was torn asunder by a car accident... this is a terrible take. The president’s hateful rhetoric isn’t inspiring the flu to shoot people in the (expletive) face."

"This is such a disappointing response," added video game designer Jennifer Scheurle. "You can care about mass shootings, the radicalization of young white men and gun violence while also caring about the other problems you mention. To be emotional about violent, preventable death is no sign of not caring about other issues."

'Honestly, what will it take?':Chris Evans, Reese Witherspoon, more stars react to U.S. mass shootings

Neil deGrasse Tyson will keep museum job after sexual misconduct investigation