mylegend <-
structure(list(bottom = structure(list(fun = "draw.key", args =
structure(list(
    key = structure(list(y = -0.2, x = 0.15, points = structure(list(
        col = c("red", "blue"), pch = c(16, 17)), .Names = c("col",
    "pch")), text = structure(list(c("TREATMENT A (N=216)", "TREATMENT B
(N=431)"
    ), col = c("red", "blue"), cex = 0.9), .Names = c("", "col",
    "cex")), columns = 2, between = 0.5, space = "bottom"), .Names = c("y",
    "x", "points", "text", "columns", "between", "space")), draw = FALSE),
.Names = c("key",
"draw"))), .Names = c("fun", "args"))), .Names = "bottom")


lattice:::evaluate.legend(mylegend)


On Macintosh 2.16
version.string R Under development (unstable) (2012-10-18 r60960)
I get a warning

> lattice:::evaluate.legend(mylegend)
$bottom
$bottom$obj
frame[plot_01.key.frame]


Warning messages:
1: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
2: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
3: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
4: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
5: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
>

On Macintosh
R version 2.15.2 RC (2012-10-18 r60960)
it works normally
> lattice:::evaluate.legend(mylegend)
$bottom
$bottom$obj
frame[.key.frame]


>


On Windows, it works normally
version.string R version 2.15.1 (2012-06-22)

> lattice:::evaluate.legend(mylegend)
$bottom
$bottom$obj
frame[plot_01.key.frame]


>



This is the Macintosh trace

> trace(lattice:::evaluate.legend, exit=recover)
Tracing function "evaluate.legend" in package "lattice
(not-exported)"
[1] "evaluate.legend"
> lattice:::evaluate.legend(ae.tr$legend)
Tracing lattice:::evaluate.legend(ae.tr$legend) on exit

Enter a frame number, or 0 to exit

1: lattice:::evaluate.legend(ae.tr$legend)

Selection: 1
Called from: .doTrace(recover(), "on exit")
Browse[1]> ls()
[1] "fun"    "i"      "legend"
Warning messages:
1: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
2: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
3: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
4: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
5: In FUN(X[[9L]], ...) : 'x' is NULL so the result will be NULL
Browse[1]> fun
frame[plot_01.key.frame]
Browse[1]> i
[1] 1
Browse[1]> legend
$bottom
$bottom$obj
frame[plot_01.key.frame]


Browse[1]> Q
>



This is the Windows trace

> trace(lattice:::evaluate.legend, exit=recover)
Tracing function "evaluate.legend" in package "lattice
(not-exported)"
[1] "evaluate.legend"
> lattice:::evaluate.legend(ae.tr$legend)
Tracing lattice:::evaluate.legend(ae.tr$legend) on exit

Enter a frame number, or 0 to exit

1: lattice:::evaluate.legend(ae.tr$legend)

Selection: 1
Called from: .doTrace(recover(), "on exit")
Browse[1]> ls()
[1] "fun"    "i"      "legend"
Browse[1]> fun
frame[plot_01.key.frame]
Browse[1]> i
[1] 1
Browse[1]> legend
$bottom
$bottom$obj
frame[plot_01.key.frame]


Browse[1]> Q
>



On Windows I have
version.string R version 2.15.1 (2012-06-22)

On Macintosh I have
version.string R Under development (unstable) (2012-08-02 r60091)

        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to