[R] png package in Ubuntu 12.04 with R 3.1.0

Gygli, Gudrun gudrun.gygli at wur.nl
Tue May 26 09:10:35 CEST 2015


Dear All,


I am using R to analyse computer simulations of ligand docking in a protein.

I am plotting the results as scatterplots and bopxplots, using the code below.

This works perfectly fine.


I would like now to add a png file to that plot, meaning I want sth like:


png(file="analysis.png")
par(mfrow=c(1,3), oma=c(0,0,2,0))

plot

boxplot

PNG figure I read in


I am running Ubuntu 12.04 and R 3.1.0.


readPNG and the png packge do NOT work for me at this point.


when I try to install the png package I get the error below.


Any ideas what's wrong or other options to import png files?


Thank you in advance for the help.


Best regards


Gudrun



png(file="analysis.png")
par(mfrow=c(1,2), oma=c(0,0,2,0))
plot(data, main="all", xlab="simulations run", ylab="steps")
boxplot(data, main="steps", horizontal = FALSE, axes = FALSE, staplewex = 1)
text(y = boxplot.stats(data)$stats, labels = boxplot.stats(data)$stats, x = 1.35)
title("analysis", outer=TRUE)



install.packages("png")


downloaded 24 Kb


* installing *source* package 'png' ...
** package 'png' successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      `libpng-config --cflags` -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c read.c -o read.o
/bin/bash: libpng-config: command not found
read.c:3:17: fatal error: png.h: No such file or directory
compilation terminated.
make: *** [read.o] Error 1
ERROR: compilation failed for package 'png'
* removing '/home/g1/R/x86_64-pc-linux-gnu-library/3.1/png'

The downloaded source packages are in
    '/tmp/Rtmpvo3r8J/downloaded_packages'
Warning message:
In install.packages("png") :
  installation of package 'png' had non-zero exit status




Gudrun Gygli, MSc

PhD candidate

Wageningen University
Laboratory of Biochemistry
Dreijenlaan 3
6703 HA Wageningen
The Netherlands

Phone  31 317483387
e-mail: gudrun.gygli at wur.nl

- - - - - - - - - - - - - - - - - -

Project information: http://www.wageningenur.nl/en/show/Bioinformatics-structural-biology-and-molecular-modeling-of-Vanillyl-Alcohol-Oxidases-VAOs.htm



More information about the R-help mailing list