0% found this document useful (0 votes)
36 views6 pages

Package Digitize': R Topics Documented

The digitize package provides functions for digitizing data from published plots or graphs. It allows the user to import data by calibrating an image and locating data points. The main function, digitize, reads an image file, calibrates it by having the user select calibration points, and then digitizes the data by clicking on the data points. The package is designed to work similarly to other programs that extract numeric data from images.

Uploaded by

mike.ma1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views6 pages

Package Digitize': R Topics Documented

The digitize package provides functions for digitizing data from published plots or graphs. It allows the user to import data by calibrating an image and locating data points. The main function, digitize, reads an image file, calibrates it by having the user select calibration points, and then digitizes the data by clicking on the data points. The package is designed to work similarly to other programs that extract numeric data from images.

Uploaded by

mike.ma1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Package ‘digitize’

August 27, 2016


Version 0.0.4
Date 2016-08-26
Title Use Data from Published Plots in R
Depends R (>= 2.2.0)
Description Import data from a digital image; it requires user input for
calibration and to locate the data points. The end result is similar to
'DataThief' and other other programs that 'digitize' published plots or
graphs.
License GPL (>= 2)
Encoding UTF-8
URL https://github.com/tpoisot/digitize/
BugReports https://github.com/tpoisot/digitize/issues
Imports graphics, readbitmap (>= 0.1-4)
RoxygenNote 5.0.1
Suggests testthat
NeedsCompilation no
Author Timothée Poisot [aut],
Rene Sachse [aut],
Jaime Ashander [aut, cre],
Tal Galili [aut]
Maintainer Jaime Ashander <[email protected]>
Repository CRAN
Date/Publication 2016-08-27 07:52:45

R topics documented:
digitize-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Calibrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
DigitData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
digitize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
ReadAndCal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1
2 Calibrate

Index 6

digitize-package digitize : a plot digitizer in R

Description
Get data from a graph by providing calibration points

Details
The package provides one main function, ‘digitize‘, which runs functions that 1) Read the image in
and calibrate it, and 2) Digitize the data. The first step requires user input.

Calibrate (deprecated) Digitize the data

Description
(deprecated) Digitize the data

Usage
Calibrate(data, calpoints, x1, x2, y1, y2)

Arguments
data output of ‘DigitData‘
calpoints output of ‘ReadAndCal‘
x1 X-coordinate of the leftmost x point (corrected)
x2 X-coordinate of the rightmost x point (corrected)
y1 Y-coordinate of the lower y point (corrected)
y2 Y-coordinate of the upper y point (corrected)

Details
deprecated. This function corrects the data according to the calibration information. Usage further
explained at http://lukemiller.org/index.php/2011/06/digitizing-data-from-old-plots-using-digitize/

Value
‘data‘ A data frame with the corrected coordinates of the points

Examples
## Not run: Calibrate(data,calpoints,x1,x2,y1,y2)
DigitData 3

DigitData (deprecated) Mark the data on an image

Description
(deprecated) Mark the data on an image

Usage
DigitData(col = "red", type = "p", ...)

Arguments
col color of marker as in ‘par‘
type shape of marker as in ‘par‘
... other args for ‘locator‘

Details
deprecated. This function waits for the user to click the points of the coordinates. See ‘graph-
ics::locator‘ for more. Usage explained at http://lukemiller.org/index.php/2011/06/digitizing-data-
from-old-plots-using-digitize/

Value
‘data‘ A list with the coordinates of the points

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
4 ReadAndCal

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.

Value
a data.frame containing the digitized data

Examples
## Not run:
tmp <- tempfile()
png(tmp)
plot(rnorm(10) + 1:10, xlab="x", ylab="y")
dev.off()

mydata <- digitize(tmp)

## End(Not run)

ReadAndCal (deprecated) Read image and calibrate

Description
(deprecated) Read image and calibrate

Usage
ReadAndCal(fname)

Arguments
fname Filename of the graphic to read

Details
deprecated. Called for side effect of user locating points. See ‘graphics::locator‘ for more. Usage
explained at http://lukemiller.org/index.php/2011/06/digitizing-data-from-old-plots-using-digitize/
ReadAndCal 5

Value
‘calpoints‘ List of the x and y coordinates of the calibration points

Examples
## Not run: ReadAndCal(fname)
Index

Calibrate, 2

DigitData, 3
digitize, 3
digitize-package, 2

ReadAndCal, 4

You might also like