[R] RGB function

From: Kartik Pappu <kartik.pappu_at_gmail.com>
Date: Mon 31 Jul 2006 - 14:36:34 EST

Hi all,

I created three separate square matrices (lets say R, G, and B). each one contains a series of values between 0 and 1. I want to be able to take for example R[1], G[1], B[1] and create a rgb color value into a fourth matrix. I tried using the rgb function but I must be doing something wrong because it fails with the following error message.

(list) object cannot be coerced to 'double'.

Any ideas on how I could do this.


R-help@stat.math.ethz.ch mailing list
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. Received on Mon Jul 31 14:43:09 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 31 Jul 2006 - 16:18:00 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.