The function combines two steps necessary to install a CWB corpus wrapped into
a R data package. First, it calls install.packages, then it
resets the path pointing to the directory with the indexed corpus
files in the registry file.
The corpus will be installed to the standard library directory for installing R packages
(.libPaths{}[1]). Another location can be used by stating the param 'lib'
explicitly (see documentation for install.packages).
The function can also be used to install a corpus from a password protected repository. Further
parameters are handed over to install.packages, so you might add
method = "wget" extra = "--user donald --password duck".
See examples how to check whether the directory has been set correctly.
An installed data package with a CWB corpus is assumed to include a directory
/extdata/cwb/registry for registry files and a directory
/extdata/cwb/indexed_corpora for the inexed corpus files.