Collostructions

The R package

{collostructions} is an R implementation for collostructional analysis. 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.2.0 (09-Feb-2021).

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

NOTE. With R’s recent major release of R.4.x, there have been reports that the {collostructions} version v.0.1.0 failed to load on Windows, this is fixed with v.0.2.0. On both my Macs, both v.0.1.0 and v.0.2.0 work on all versions R.3.x and newer, so there is no general compatibility problem. However, version v.0.2.0 comes with some major improvements and additions, so an update is probably useful for many users.

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.

Package for R.4.x (v.0.2.0 should be fine on R.3.x on Mac/Linux):

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

Package for R.3.x (v.0.2.0 should be fine on R.3.x on Mac/Linux):

Mac/Linux collostructions_0.1.0.tar.gz
Windows collostructions_0.1.0.zip
Install / Load:

You can watch the installation clip.

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 like so:

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. 2021. Collostructions: An R implementation for the family of collostructional methods. Package version v.0.2.0, https://sfla.ch/collostructions/.

Acknowledgements

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