# Abort R session when calculating betweenness/closeness centrality

**URL:** <https://igraph.discourse.group/t/abort-r-session-when-calculating-betweenness-closeness-centrality/695>\
**Category:** Usage\
**Tags:** R\
**Created:** [30 March 2021 09:21 UTC](https://igraph.discourse.group/t/abort-r-session-when-calculating-betweenness-closeness-centrality/695 "2021-03-30T09:21:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [30 March 2021 09:53 UTC](https://igraph.discourse.group/t/abort-r-session-when-calculating-betweenness-closeness-centrality/695/2 "2021-03-30T09:53:31Z")

</div>

Please show a complete reproducible example (including the offending data file).

If there are `NA` or `NaN` values in your data, be sure to get rid of them. igraph cannot usually handle them.

---

_[View the full topic](https://igraph.discourse.group/t/abort-r-session-when-calculating-betweenness-closeness-centrality/695)._
