[R] All the products of common factors

Stavros Macrakis macrakis at alum.mit.edu
Wed Feb 25 16:50:44 CET 2009


On Wed, Feb 25, 2009 at 9:25 AM, Fox, Gordon <gfox at cas.usf.edu> wrote:
> The tricky part isn't finding the common factors -- we knew how to do
> that, though not in so concise a fashion as some of these suggestions.
> It was finding all their products without what I (as a recovered Fortran
> programmer) would call "truly brute force." Several of these suggestions
> solve the problem nicely!

Are you sure you are not confusing *prime factors* with *factors*?  My
understanding is that you are looking for all the factors of A which
are also factors of B, i.e. the common factors of A and B.  Why else
would you be computing all those products?

               -s




More information about the R-help mailing list