visCount: Train visual count estimates

Description Usage Arguments Author(s) Examples

View source: R/visCount.R

Description

This functions plots a random number (within user-defined limits) of symbols or .png images at random positions in the plotting window, asks you to type in your estimate, and then shows you exactly how many symbols/pictures there were and the extent of your estimate error. It also stores these data in a VisCountSessions table which you can retrieve later and which can be used by the visCountStats function to provide performance statistics.

Usage

1
visCount(Nmax = 100, Nmin = 10, shape = 20, size = 1, col = "black", bg = "white")

Arguments

Nmax

maximum number of symbols to plot; defaults to 100.

Nmin

minimum number of symbols to plot; defaults to 10.

shape

plotting items to use. Can be one of the plotting symbols available in R (see 'pch' values in points), such as the default 20 for a black dot, or a keyboard character in quotes, or the complete folder path (in quotes and including the file name and extension) to a .png image of the subject to count, preferably with transparent background (see examples).

size

size for the plotting symbols (see 'cex' in points)

col

colour for the plotting symbols (see 'col' in points). The default is "black". Ignored if shape is a .png image.

bg

colour for the plot background. Can be one of the colours available in R (see 'bg' in par, and type colours() for available colour names), or the complete folder path (in quotes and including the file name and extension) to a .png image (see examples). Defaults to "white".

Author(s)

A. Marcia Barbosa

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Not run: 

# practise visCount and enter your estimates as prompted:

visCount()  # repeat until bored


# practise also with different shapes, sizes, colours and backgrounds:

visCount(shape = "^", bg = "white")
visCount(shape = "~", size = 1.3)
visCount(shape = "x", size = 2, col = "brown")
visCount(shape = "Y", bg = "wheat")


# practise with different number limits
# (you can combine with any of the arguments above):

visCount(Nmax = 500, Nmin = 100)


# you can also use animal and/or background pictures in PNG format
# (you need to have the png R package installed for this);
# here are some examples with downloaded public domain images:

download.file(url = "http://viscount.r-forge.r-project.org/img/flamingo_flying.png", 
destfile = "flamingo_flying.png")
download.file(url = "http://viscount.r-forge.r-project.org/img/clouds.png", 
destfile = "clouds.png")
visCount(shape = "flamingo_flying.png", bg = "lightblue")
visCount(shape = "flamingo_flying.png", size = 0.5, bg = "clouds.png")

download.file(url = "http://viscount.r-forge.r-project.org/img/gull_standing.png", 
destfile = "gull_standing.png")
download.file(url = "http://viscount.r-forge.r-project.org/img/water.png", 
destfile = "water.png")
visCount(shape = "gull_standing.png", bg = "grey")
visCount(shape = "gull_standing.png", bg = "water.png")


## End(Not run)

VisCount documentation built on May 2, 2019, 4:52 p.m.