Skip to content
Prev 261957 / 398502 Next

Question about example function

Hi Abhilash,
local: logical: if ?TRUE? evaluate locally, if ?FALSE? evaluate in
the workspace.

So all you need to do is:
mean> x <- c(0:10, 50)

mean> xm <- mean(x)

mean> c(xm, mean(x, trim = 0.10))
[1] 8.75 5.50

mean> mean(USArrests, trim = 0.2)
  Murder  Assault UrbanPop     Rape
    7.42   167.60    66.20    20.16
[1] 0

and nothing in your workspace is changed.

Best,
Ethan

On Sun, Jun 5, 2011 at 11:13 AM, Abhilash Balakrishnan
<balaabhil at gmail.com> wrote: