Learn R Programming

digitize (version 0.0.4)

digitize: digitize an image

Description

digitize an image

Usage

digitize(image_filename, ..., x1, x2, y1, y2)

Arguments

image_filename
the image file you wish to digitze
...
pass parameters col or type to change data calibration points
x1
(optional) left-most x-axis point
x2
(optional) right-most axis point
y1
(optional) the lower y-axis point
y2
(optional) the upper y-axis point

Value

a data.frame containing the digitized data

Details

Proceeds in two steps, both of which require user input from the mouse:

1) Read the image in and calibrate it

2) Digitize the data

Calibration points are optionally passed via arguments x1, x2, y1, y2. These **must be named in full** if passed.

If not specified, you are prompted to enter these in the console. Note, you don’t need to choose the end points of each axis, only two points for which you know the x or y return.

Examples

Run this code
## Not run: 
# tmp <- tempfile()
# png(tmp)
# plot(rnorm(10) + 1:10, xlab="x", ylab="y")
# dev.off()
# 
# mydata <- digitize(tmp)
# ## End(Not run)

Run the code above in your browser using DataLab