clearSession {Aspell}R Documentation

Clear the details from the current spelling session

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

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

  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)


[Package Aspell version 0.2-0 Index]