I would like R to display floating point numbers only a small amount of digits after the decimal dot.
much like “format short” would do in matlab.
Is there a simple way to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can either use an ad-hoc conversion through either formatC, sprintf or format
or you set the digits option:
or the scipen option: