[R] Missing basic understanding of classes, generic functions and methods

rkevinburton at charter.net rkevinburton at charter.net
Fri Oct 3 15:12:09 CEST 2008


It turns out not to be a misunderstanding about generice functions it was a mistaken assumption about the values being returned from 'fft'. I made the mistaken assumption (based on an EE background) that 'fft' would always return a vector of complex numbers. I didn't realize that 'fft' could also return a time series with complex values. Sorry.

Kevin

---- Martin Maechler <maechler at stat.math.ethz.ch> wrote: 
> >>>>>   <rkevinburton at charter.net>
> >>>>>     on Thu, 2 Oct 2008 10:02:04 -0700 writes:
> 
>     > Sorry, I must be looking at a different section but when I look at 3.4 in r-intro.pdf I see:
>     > 3.4 The class of an object
>     > All objects in R have a class, reported by the function class. For simple vectors this is just the
>     > mode, for example "numeric", "logical", "character" or "list", but "matrix", "array",
>     > "factor" and "data.frame" are other possible values.
>     > . . . .
> 
>     > This doesn't seem to indicate how/why plot shows a time series for the "exact" inverse fft yet shows Re vs. Im in a filtered version.
> 
> Then read on, or start re-reading the introduction from the
> beginning. In addition to know about classes, you really *must*
> understand a bit about generic functions and methods before you
> can understand more.
> 
> Martin
> 
>     > ---- Dieter Menne <dieter.menne at menne-biomed.de> wrote: 
>     >> <rkevinburton <at> charter.net> writes:
>     >> 
>     >> > 
>     >> > My question is how does 'plot' know to implicilty call the plot.ts (in the
>     >> case of the full "exact" spectrum
>     >> > being fed back into the inverse?
>     >> 
>     >> So the title should be "How does the specific incarnation of object orientation
>     >> in R work?" Try, for example, section 3.4 and the "generic" classes in the
>     >> R-intro.pdf
> 
> Yes!
> 
>     >> Dieter



More information about the R-help mailing list