The fastText R package is an interface to the fastText library for efficient learning of word representations and sentence classification. More details on the functionality of fastText can be found in the first and second blog posts and in the package documentation.

You can either install the package from CRAN using,


or from Github using the install_github function of the remotes package,


or directly download the fastText-zip file using the Clone or download button in the repository page, extract it locally (rename it to fastText if necessary and check that files such as DESCRIPTION, NAMESPACE etc. are present when you open the fastText folder) and then run,

# on a Unix OS

Rcpp::compileAttributes(verbose = TRUE)
system("R CMD build fastText")
system("R CMD INSTALL fastText_1.0.1.tar.gz")

# on the Windows OS  

Rcpp::compileAttributes(verbose = TRUE)
system("R CMD build fastText")
system("R CMD INSTALL fastText_1.0.1.tar.gz")

Use the following link to report bugs/issues (for the R package port),


If you use the fastText R package in your paper or research please cite both fastText and the original articles / software

  title = {{fastText}: Efficient Learning of Word Representations and
    Sentence Classification using R},
  author = {Lampros Mouselimis},
  year = {2021},
  note = {R package version 1.0.3},
  url = {},