Sum() function not working

A similar question is found here: Sum function not working, but it is not relevant to mine.

I am trying to use the sum() function, but it is not working.

I have tried it on
x=c(1,2,3,4,5)
sum(x)

But I get the following error:
Error: C stack usage 15926336 is too close to the limit

As of the time of writing, I am using the latest version of RStudio. Please, can someone help me? What should I do to fix my problem?

Most likely you ran some other code before that put your R session in a bad state.
Recommend you fully restart R , without loading previous workspace (i.e. a clean state, the environment pane should be empty) and try this code again.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.