Dr Susanne Flach | Linguist

Neuchâtel | Switzerland

Collostructions

The R package

{collostructions} is an R implementation of the family of collostructional methods. The package contains functions to perform Simple, Distinctive, and Co-Varying Collexeme Analyses, as well as some useful functions for transformation and the creation of frequency lists. There are sample data sets for all functions with documentation. The package is discussed in Episode X of my R tutorial. The current pre-CRAN version is v.0.1.0 (15-Nov-2017).

If you have questions, complaints, feedback, ideas & suggestions for implementations in future versions or if you require an older version, I’m happy to hear from you.

Download / Install:

You can also watch the installation clip.

DOWNLOAD. Download the source code for your operating system. Do not unzip or decompressAttention: Safari will decompress the folder automatically — deactivate automatic decompression, or, better still, use Chrome, Firefox or Opera.

Mac/Linux collostructions_0.1.0.tar.gz
Windows collostructions_0.1.0.zip

INSTALL. Start R or RStudio. To install, type this at the console and then, in the dialogue that opens, navigate to the folder where you downloaded the package to:

install.packages(file.choose(), repos = NULL)

In RStudio, you can also go to Tools > Install packages or select the Packages tab in the bottom right pane and then klick Install. At Install from select Package Archive File (.zip; .tar.gz) and browse to the location of the downloaded package.

LOAD. To make package available in R, load it with:

library(collostructions)

If you receive a warning message in Windows that the package was built in R-3.4.0 or something similar, ignore the message.

NOTE. If you are “upgrading” from a previous version (i.e., if you have installed the package before), close and re-start R/RStudio before loading the package. If you don’t, you will likely get error messages that the package or parts of the package are corrupted.

Tutorial

Ready? Follow the R tutorial on {collostructions} for examples of use. If you want more training in R itself, try the R basics tutorial (Episode 1).

Cite

Flach, Susanne. 2017. Collostructions: An R implementation for the family of collostructional methods. Package version v.0.1.0, https://sfla.ch/collostructions/.

Acknowledgements

I thank Anatol Stefanowitsch, Berit Johannsen, Kirsten Middeke and Volodymyr Dekalo for feedback, comments, suggestions, and testing (and Anatol for a code snippet in collex.covar() so that the package runs without dependencies).