This R-package provides functions for extracting articles (with metadata) from .txt-files downloaded from ATEKST and import them into R. They return a data frame with the headline, paper, date and time of publication, mode (net vs print), url and text of each news article. The package includes two functions (see the documentation):
read.atekst()
Import articles from a single .txt-file.read.atekst.dir()
Import articles from all .txt-files in a directory (including subfolders).
You need the devtools
package in order to install atekstR
. You can install it using the follow code (note that you only need to run this once):
if(!require(devtools)) install.packages("devtools")
You can then load devtools
and install atekstR
by running:
library(devtools)
install_github("mikaelpoul/atekstR", dependencies = TRUE)
If you have any problems or suggestions, feel free to open an issue or send me an email. I welcome corrections, suggestions or questions large or small.