pi value is incorrect

The pi value from RStudio is incorrect. I got 0.2290076

pi

Perhaps you assigned a value to pi. Try removing the pi variable.

pi
[1] 3.141593
pi <- 2
pi
[1] 2
rm(pi)
pi
[1] 3.141593

looks good now. Thanks.

image

However, once I restarted RStudio. I went back to the incorrect pi valu

Do you restore .RData at startup? You can check this out at Tools -> Global Options and look in the workspace section. I recommend not restoring it at startup and never saving workspace on exit.

Check that nothing is saved in your R.

#install.packages("usethis") # you may need to run this if it isn't installed
usethis::edit_r_profile()

hello,
I just unchecked it. The pi value looks correct now. Thanks.

Regards,

Philip

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.