I’m just learning R, so please forgive what I’m sure is a very elementary question. How do I take the real part of a complex number?
Share
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.
If you read the help file for
complex(?complex), you will see a number of functions for performing complex arithmetic. The details clearly stateTherefore
Use
Re:For the imaginary part:
?complexwill list other useful functions.