R/diameter_measurer.R
diameter_measurer.Rd
This function launch a shiny application in browser to measure the distance between a pair of clicks. See section Details for usage of the application.
diameter_measurer(files, labels = "Plate", obs = "Done with ClickMetrics", csv = "my_clicks.csv", width = "800px", height = "800px", app_path = NULL)
files |
|
---|---|
labels |
|
obs |
|
csv |
|
width |
|
height |
|
app_path |
|
The function creates a CSV file with recorded clicks. After
pressing Exit button, a data.frame
is returned. It
contains all click coordinates.
Contains widgets to user interact with.
Shows the image and a table with clicks already done. Each click adds a dot on the plot. A pair of consective cliks are linked by a line segment.
Selects the image to be measured. A
column named image
in the returned data.frame
will
contain this information.
Selects the treament, condition
or component associated with the clicks. A column named
component
in the returned data.frame
will contain
this information. Note: double click in the image cycles
among itens, so, a double click move to the next component in the
list.
A text field used to inform
anything, like the user name (a global information), or the color
of the mycelium, the growth temperature (local
information). Note: this information must be filled
before the clicks. A column named obs
in the returned
data.frame
will contain this information.
It triggers write.csv()
to
save clicks in disc. The button should be pressed after all
clicks have been made. A column named ts
in the returned
data.frame
will contain the time stamp of the recorded
data.
Undoes the last click.
Clean all clicks.
Stops the application.
# NOT RUN { files <- dir(path = system.file("images", package = "ClickMetrics"), pattern = "^petri.*\\.png$", full.names = TRUE) files tb <- diameter_measurer(files = files, labels = c("Plate", "Trat1", "Trat2"), obs = "Done with ClickMetrics", csv = "my_clicks.csv") str(tb) with(tb, by(cbind(x, y), INDICES = pair, FUN = dist)) # }