(perdón por el retraso en contestar). Ahí va un ejemplito de gplots, veréis que 
es muy sencillito y se integra bien casi con cualquier script



# Ejemplo de uso gplots para generar un pdf con texto, tabla y gráficos

library(gplots)

pdf("mi_fichero_out.pdf")

# 1 imprime un texto

title1 <- paste("Esto es",  "una prueba", sep = "\n")
textplot(title1,
         halign="left",
         valign="top",
         cex=1,
         fixed.width=TRUE)

# 2 imprime una tabla o resumen

tabla <- summary(cars)
impr <- capture.output(tabla)
textplot(impr,
         halign="left",
         valign="top",
         cex=0.75,
         fixed.width=TRUE)
title("prueba de impresión de una tabla")

# 3 imprime un gráfico - no hace falta capture.output

plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
     las = 1)
lines(lowess(cars$speed, cars$dist, f = 2/3, iter = 3), col = "red")
title(main = "cars data")

# cierras la conexión con el fichero pdf
dev.off()



--
Pedro Concejero
BigData - Analytics @ Telefónica I+D<http://www.tid.es/es/Paginas/default.aspx>
E-mail: [email protected]<mailto:[email protected]>
skype: pedro.concejero
twitter: @ConcejeroPedro
linkedin <http://www.linkedin.com/in/pedroconcejero/es>
Únete a la lista R en 
español<https://stat.ethz.ch/mailman/listinfo/r-help-es#%21> y a tu gRupo local 
R, el mío es el gRupo R madRid 
<http://r-es.org/Grupo+de+Inter%C3%A9s+Local+de+Madrid+-+GIL+Madrid&structure=Comunidad>

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar 
nuestra política de envío y recepción de correo electrónico en el enlace 
situado más abajo.
This message is intended exclusively for its addressee. We only send and 
receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx

        [[alternative HTML version deleted]]

_______________________________________________
R-help-es mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-help-es

Responder a