[R] warning with hist

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Mon Sep 1 12:56:26 CEST 2008


> I don't understand the warning I get when executing the following code:
> 
> x <- rnorm(100)
> h <- hist(x, plot= FALSE, freq = FALSE)

The warning is
"Warning message:
In hist.default(x, plot = FALSE, freq = FALSE) :
  argument ‘freq’ is not made use of"

The explanation is pretty simple. 

freq determines whether or not the histogram is of counts or probability 
densities.  Since you used plot=FALSE, you aren't plotting anything, so 
freq does nothing.

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential information intended
for the addressee(s) only. If this message was sent to you in error,
you must not disseminate, copy or take any action in reliance on it and
we request that you notify the sender immediately by return email.

Opinions expressed in this message and any attachments are not
necessarily those held by the Health and Safety Laboratory or any person
connected with the organisation, save those by whom the opinions were
expressed.

Please note that any messages sent or received by the Health and Safety
Laboratory email system may be monitored and stored in an information
retrieval system.
------------------------------------------------------------------------

------------------------------------------------------------------------
Scanned by MailMarshal - Marshal's comprehensive email content security
solution. Download a free evaluation of MailMarshal at www.marshal.com
------------------------------------------------------------------------


More information about the R-help mailing list