From the help file:
If ‘cost’ is not given, ‘all’ defaults to 10%, and the other transformation number bounds default to ‘all’.
As far as I understand it means that either cost
or all
is a limiting factor even if you set del
, ins
and sub
. If you want to allow 10 transformations you can simply set max = 10
. Additional parameters can be used to limit specific transformations, for example:
> x <- c("fooar","ooar","foobaz")
> agrep("foobar", x, value=T, max = list(all = 3, del = 0, ins = 0))
[1] "foobaz"
In your case you could use max = list(all = 10 ,del = 10, ins = 10, sub = 10))
.