clearSession: Clear the details from the current spelling session

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/aspell.R

Description

This function clears the specified speller instance of all information it has collected during the (spelling) session and make it is behave as if it were a new speller.

One can also create a new speller. The advantage of clearing it is that the options are still present.

Usage

1
clearSession(speller)

Arguments

speller

the AspellSpeller-class object which is to be cleared.

Value

An integer value indicating whether the operation was successful (non-zero) or not (0).

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://aspell.sourceforge.net

See Also

getSpeller AspellSpeller-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  sp = getSpeller()
  aspell("duncan", FALSE, speller = sp)
  addToList("duncan", speller = sp)

   # Should be treated as spelled correctly now.
  aspell("duncan", FALSE, speller = sp)

    # Will throw error if a WritableDict since method is unimplemented.
  try(clearSession(sp))

  # Should be mis-spelled again.
  aspell("duncan", FALSE, speller = sp)

omegahat/Aspell documentation built on May 24, 2019, 1:50 p.m.