[R] png package in Ubuntu 12.04 with R 3.1.0
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.gy...@wur.nl - - - - - - - - - - - - - - - - - - Project information: http://www.wageningenur.nl/en/show/Bioinformatics-structural-biology-and-molecular-modeling-of-Vanillyl-Alcohol-Oxidases-VAOs.htm __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] png package in Ubuntu 12.04 with R 3.1.0
Have you loaded the png package? library(png) John Kane Kingston ON Canada -Original Message- From: gudrun.gy...@wur.nl Sent: Tue, 26 May 2015 07:10:35 + To: r-help@r-project.org Subject: [R] png package in Ubuntu 12.04 with R 3.1.0 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.gy...@wur.nl - - - - - - - - - - - - - - - - - - Project information: http://www.wageningenur.nl/en/show/Bioinformatics-structural-biology-and-molecular-modeling-of-Vanillyl-Alcohol-Oxidases-VAOs.htm __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] png package in Ubuntu 12.04 with R 3.1.0
sudo apt-get install libpng12-dev I'm not sure about Ubuntu 12.04. You may need a different libpng??-dev. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Web: http://yihui.name On Tue, May 26, 2015 at 2:10 AM, Gygli, Gudrun gudrun.gy...@wur.nl wrote: 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.gy...@wur.nl - - - - - - - - - - - - - - - - - - Project information: http://www.wageningenur.nl/en/show/Bioinformatics-structural-biology-and-molecular-modeling-of-Vanillyl-Alcohol-Oxidases-VAOs.htm __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.