Monday, October 2, 2017

Ishihara color-vision test in R

I just created a very simple package called ishihara that plots the traditional Ishihara color-vision test plates. So far I have only digitized Plate #2.

The package can be installed from GitHub using devtools as follows:

library(devtools)
install_github("liamrevell/ishihara")

This is how it works so far:

library(ishihara)
## 
##    ***********************************************
##    *                                             *
##    *    This package is just for fun & is not a  *
##    *           medical diagnostic tool.          *
##    *                                             *
##    ***********************************************
data(plate2)
print(plate2)
## 
##    Object of class "ishihara" containing 738 shapes.
## 
##    To reveal hidden number, character, or figure 
##    print with show.hidden=TRUE.
par(mar=rep(0,4))
plot(plate2)

plot of chunk unnamed-chunk-2

print(plate2,show.hidden=TRUE)
## 
##    Object of class "ishihara" containing 738 shapes.
## 
##    Hidden number, character, or figure is: 2.

This tells us that a normal color vision individual should see the #2 in this plate. I see nothing. What do you see?

No comments:

Post a Comment

Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.