completion: Code or arguments completion

Description Usage Arguments Value Author(s) See Also Examples

Description

Provide a list of completion candidates for code or arguments like col, lty or pch.

Usage

1
2
3
4

Arguments

...

arguments passed to completion.

line

the line of code currently edited.

Value

For completeCode(), a list with these items:

token

the token being completed.

completions

a matrix of potential completions.

fun

in case of function completion, the name of the function.

tooltip

in case of function completion, the function tooltip.

For completeCol(), a list with these items:

token

the token being completed.

completions

list of color names.

col.rgb

matrix with RGB values for the corresponding colors.

For the other function, the returned list contains:

token

the token being completed.

completions

list of completion items.

Author(s)

Romain Francois <francoisromain@free.fr>

See Also

completion

Examples

1
2
3
4
completeCode("browse")
completeCol("plot(x, y, col = ")
completeLty("plot(x, y, lty = ")
completePch("plot(x, y, pch = ")

Example output

$token
[1] "browse"

$completions
        completion     type    types
1           browse function function
2        browseEnv function function
3        browseURL function function
4  browseVignettes function function
5          browser function function
6 browserCondition function function
7  browserSetDebug function function
8      browserText function function

$fun
[1] ""

$tooltip
NULL

$token
[1] "plot(x, y, col = "

$completions
[1] 1 2 3 4 5 6 7 8

$col.rgb
     red green blue
[1,]   0     0    0
[2,] 255     0    0
[3,]   0   205    0
[4,]   0     0  255
[5,]   0   255  255
[6,] 255     0  255
[7,] 255   255    0
[8,] 190   190  190

$token
[1] "plot(x, y, lty = "

$completions
[1] "blank"    "dashed"   "solid"    "dotted"   "longdash" "twodash" 

$token
[1] "plot(x, y, pch = "

$completions
 [1]  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

svTools documentation built on May 2, 2019, 3:21 a.m.