[Rd] Call trellis function in a function (PR#8827)

xiao.gang.fan1 at libertysurf.fr xiao.gang.fan1 at libertysurf.fr
Tue May 2 15:57:25 CEST 2006


Full_Name: Fan
Version: 2.2.1
OS: Windows
Submission from: (NULL) (159.50.101.9)


Hello,

When I call trellis function (such as histogram, densityplot, etc.) in a
function,
the call seems being ignored (no graphics is drawing) if some other instructions

are placed afeter that call. 

Here's an example:

y = rnorm(100*3)
b = sample(1:3,300,replace=T)

f = function()
{
  densityplot(~y|b)
}

f1 = function()
{
  densityplot(~y|b)
  return(1)
}

f1()  # this will not draw the histogram
f()   # this will draw the histogram

Thanks in advance
Kind regards
--
Fan



More information about the R-devel mailing list