I would like to import "tif" images in R and I do not find any function that can do that. In Matlab there exists the function "imread" that can read the most known images format. Does a similar function exist for R ? Thanks in advance -- Herve CARDOT ____________________________________________________________ Unite Biometrie et Intelligence Artificielle, INRA Toulouse BP 27, 31326 Castanet-Tolosan cedex, France. Tel: (+33)5.61.28.50.64 mailto:Herve.Cardot at toulouse.inra.fr Page Equipe: http://www.inra.fr/bia/T/modelisation/Doc/ Page Perso: http://www.inra.fr/bia/T/cardot/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 20 Feb 2002, Herve Cardot wrote:> > I would like to import "tif" images in R and I do not find any > function that can do that. In Matlab there exists the function "imread" > > that can read the most known images format. Does a similar function > exist for R ? >If you can convert your image to a portable anymap, then read.pnm() in the pixmap package should do this. On Linux/Unix the NetPBM program tifftopnm does the conversion, ImageMagick convert does it, and many bitmap graphics applications will too. Roger> -- > Herve CARDOT > ____________________________________________________________ > Unite Biometrie et Intelligence Artificielle, INRA Toulouse > BP 27, 31326 Castanet-Tolosan cedex, France. > Tel: (+33)5.61.28.50.64 mailto:Herve.Cardot at toulouse.inra.fr > Page Equipe: http://www.inra.fr/bia/T/modelisation/Doc/ > Page Perso: http://www.inra.fr/bia/T/cardot/ > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand at nhh.no and: Department of Geography and Regional Development, University of Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> On Wed, 20 Feb 2002 13:26:30 +0100, >>>>> Herve Cardot (HC) wrote:> I would like to import "tif" images in R and I do not find any > function that can do that. In Matlab there exists the function "imread" > that can read the most known images format. Does a similar function > exist for R ? No, but you can convert the picture to pnm format and then read it using the pixmap package. You're more than welcome to submit TIF read/write routines if you want to avoid the conversion :-) Best, Fritz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I have a dataframe 'dat' with one response and some covariates. Many observations (rows), but only a few unique combinations of the covariates. Let's say that the response is in column 1, and the covariates in columns 2:k. I want to do> covar <- unique.data.frame(dat[, 2:k]) > y <- dat[, 1] > keys <- ??????where 'keys' should be a vector of length length(y) and contain the row numbers in 'covar', where the response will find its covariates. Example:> daty x1 x2 1 1 1 0 2 2 0 1 3 3 1 0> unique.data.frame(dat[, 2:3])x1 x2 1 1 0 2 0 1> keys1 1 2 2 3 1 But how do I get 'keys'? -- G?ran Brostr?m tel: +46 90 786 5223 professor fax: +46 90 786 6614 Department of Statistics http://www.stat.umu.se/egna/gb/ Ume? University SE-90187 Ume?, Sweden e-mail: gb at stat.umu.se -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._