Dr. Mark Gardener 


Home  
Providing training for:

Tips and Tricks  for R and ExcelOn this page you can find tips, tricks and hints for using both R and Excel. At the end of each tip there are links forwards and backwards as appropriate. There is also an index of R tips and an index of Excel tips. For most analytical purposes the combination of Excel and R is unbeatable! Excel is great as a data management tool and for preparing data for analysis. You can also use it to get an overview of your data or to make simple (and not so simple) graphs. R is an analytical "swiss army knife" and can carry out a mindboggling array of analytical routines as well as producing great graphics. Tips & Tricks for R  Tips & Tricks for Excel  An Introduction to R  MonogRaphs  Writer's Bloc 

Object class complex 
Types of R object – 3. complex numbersAll R objects have a class attribute, which can be important as R "decides" how to deal with objects based upon their class. You can think of the simple classes as being in different categories:
You can make a complex number simply by appending an "imaginary" part to an actual number: > newvec = c(1+1i, 2+3i) So, R recognises 2+3i for example as a complex number with real part = 2, imaginary part = 3 The class() command shows that the result is complex: > class(newvec) There are several commands associated with complex numbers: > Re(newvec) # The real part of the number The commands help in dealing with complex numbers. In addition, the elementary trigonometric, logarithmic, exponential, square root and hyperbolic functions are implemented for complex values. 

Top  << Previous Tip: Types of R object – 2. logical  >> Next Tip: Vector objects  
Follow me... 

Top  Tips & Tricks Home  Index of R Tips  Index of Excel Tips  
More links: 
See my Publications about Excel, R, statistics and data analysis  Courses in R, data analysis, data management and statistics  Visit the R Project website  
See my Publications about statistics and data analysis. MonogRaphs: random topics in R Writer's Bloc – my latest writing project includes R scripts Courses in data analysis, data management and statistics. 
My Publications about statistics and data analysis See my personal pages at GardenersOwn 

Top  Home  Contact  GardenersOwn Homepage 