[R] question from Braun/Murdoch book

Erin Hodgess erinm.hodgess at gmail.com
Wed Oct 8 07:48:57 CEST 2008


Hi R People:

I am looking at the Braun/Murdoch book, " A First Course in
Statistical Programming in R", and I have a question about a function
there.  It's on page 52, Example 4.5; the sieve of Erastosthenes.

There is a line:
primes <- c()

Is there a difference between using that and
primes <- NULL
please?

When you put in primes <- c(), primes comes back as NULL.


Is one more efficient or is this just a matter of programming style, please?
Thanks in advance,
Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com



More information about the R-help mailing list