Unset / Unassign object value

I'm learning so ignore anything amusing.

I was computing a quad equation using A, B, C variables with assigned values.

When I gained the answer, that being, when it calculate the value of X successfully, I then stupidly assigned this value to X itself.. like this 'X <- 0.6289' .

My problem is, now every time I alter the variable values (a, b, c) X does not change in relation.

I have managed to remove X from the list of variables present in the environment section. However I still unsure how to turn X back into it's former, vacant, self.

Even if I'm being daft I would like to know.

All thoughts welcome.

Hi Bombe, I'd always just clear the environment and start again with a blank slate: either use the broom in RStudio or, when in doubt, restart R. Could you share the code that you were using? There are lots of ways that you might be evaluating a polynomial, and it's hard to give any more advice without knowing what you have so far.

You can assign X to NULL to eliminate it, or to NA to give it a vacant representation

Great response.
Much appreciated.

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.