next up previous index
Siguiente: Programacion Subir: Curso Introductorio de R Anterior: Import and Export Data   Índice de Materias


Graphics

> HousePrice <-read.table(´/home/bioinfo/cursoFeb_Jun_2007/R_sesison/data/houses.data´)
> plot(data$area, data$price) ## plot area versus price

Prepare a graphic device for drawing

> jpeg( 'houseInfo.jpg', width = 600, height = 480) 
> plot(data$area, data$price, xlab="area", ylab="price") ## draw on the graphic device
> title("house information")  ## add title to the plot
> dev.off() ## close the graphic device and complete drawing


> png('houseInfo.png', width = 480, height = 600)
> plot(data$area, data$price, xlab="area", ylab="price")
> title("house information")
> dev.off()


next up previous index
Siguiente: Programacion Subir: Curso Introductorio de R Anterior: Import and Export Data   Índice de Materias

Centro de Ciencias Genómicas/UNAM, México 2006-7