digitize: digitize an image

Description Usage Arguments Details Value Examples

View source: R/functions.r

Description

digitize an image

Usage

1
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

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<e2><80><99>t need to choose the end points of each axis, only two points for which you know the x or y return.

Value

a data.frame containing the digitized data

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
tmp <- tempfile()
png(tmp)
plot(rnorm(10) + 1:10, xlab="x", ylab="y")
dev.off()

mydata <- digitize(tmp)

## End(Not run)

digitize documentation built on May 2, 2019, 12:45 a.m.