Displaying 1 result from an estimated 1 matches for "rthetapoint".
2009 Jul 09
1
Creating and Using Objects in R
...onsider the following simple example. A point in two-dimensional
> Euclidean space can be specified by its Cartesian (x-y) or polar
> (r-theta) coordinates. Hence, to store information about the location
> of the point, we could define two classes, |"xypoint"| and
> |"rthetapoint"|. All the `xypoint' data structures are lists with an
> x-component and a y-component. All `rthetapoint' objects are lists
> with an r-component and a theta-component.
>
> Now, suppose we want to get the x-position from either type of object.
> This can easily be ach...