[R-br] Retirar dados de uma função no R

Ana Lúcia Souza Silva Mateus anawilson.ufam em gmail.com
Sexta Maio 25 09:14:55 BRT 2012


 Saudações,

Tenho a seguinte dúvida, se algúem poder me responder ficaria grata.
Estou trabalhando com a seguinte função no R (stdiagn), apresentada abaixo:

*> stdiagn
function (pts, stkh, stse, stmc = 0, Dzero = FALSE)
{
    oldpar <- par(mfrow = c(2, 2))
    pointmap(as.points(pts))
    title("Data map")
    oprod <- outer(stkh$ks, stkh$kt)
    st.D <- stkh$kst - oprod
    st.R <- st.D/(stse)
    if (!Dzero) {
        persp(stkh$s, stkh$t, st.D, xlab = "Distance", ylab = "Time",
            zlab = "D", expand = 0.5, ticktype = "detailed",
            theta = -30, shade = 0.4, cex = 0.7)
        title("D plot")
    }
    else {
        persp(stkh$s, stkh$t, st.D/oprod, xlab = "Distance",
            ylab = "Time", zlab = "Dzero", expand = 0.5, ticktype =
"detailed",
            theta = -30, shade = 0.4, cex = 0.7)
        title("Dzero plot")
    }
    plot(outer(stkh$ks, stkh$kt), st.R, xlab = "K(s)K(t)", ylab = "R")
    abline(h = 0)
    title("Residual Plot")
    if (length(stmc) > 1) {
        hist(c(stmc$t0, stmc$t), nclass = 50, include.lowest = TRUE,
            xlab = "Test statistic", main = "")
        y.75 <- par()$usr[4] * 0.75
        y.8 <- par()$usr[4] * 0.8
        lines(rep(stmc$t0, 2), c(0, y.75), lwd = 2)
        text(stmc$t0, y.8, "Data Statistic")
        title("MC results")
    }
    else {
        plot(c(0, 1), c(0, 1), type = "n", axes = FALSE, xlab = "",
            ylab = "")
        ad <- par()$adj
        par(adj = 0.5)
        text(0.5, 0.5, "No MC available")
        par(adj = ad)
    }
    par(oldpar)
}
<environment: namespace:splancs>
> *

Gostaria de obter os valores de * st.D  e  st.R .
Desde já agradeço pelo auxilio.



   *
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20120525/11e73c29/attachment.html>


Mais detalhes sobre a lista de discussão R-br