Computational environment (planned deviations)
Load the R project saved in the root directory of this repository, so
that the working directory is the root directory of the repository.
The following code snippet may ask you if you want to update some
packages. Enter ‘3’ (None) when prompted.
# Install the 'remotes' package if you haven't already
#install.packages("remotes")
# Load the 'remotes' package
library(remotes)
library(here)
## here() starts at C:/Users/ajcao/Documents/GitHub/RPl-Dorian-Ida
# installing a previous version of rtweet
# in 2021, would have been version 0.7.0.
#install.packages("devtools")
#library(devtools)
#install_version("rtweet", version = "0.7.0",
# repos = "https://cran.r-project.org")
library(rtweet)
#for knitting
packages <- c(
"here", "svDialogs", "tidyverse",
"tidytext", "tm", "igraph", "ggraph",
"tidycensus", "sf", "spdep"
)
package_check <- lapply(
packages,
FUN = function(x) {
if (!require(x, character.only = TRUE)) {
library(x, character.only = TRUE)
}
}
)
## Loading required package: svDialogs
## Loading required package: tidyverse
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ purrr::flatten() masks rtweet::flatten()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Loading required package: tidytext
##
## Loading required package: tm
##
## Loading required package: NLP
##
##
## Attaching package: 'NLP'
##
##
## The following object is masked from 'package:ggplot2':
##
## annotate
##
##
## Loading required package: igraph
##
##
## Attaching package: 'igraph'
##
##
## The following objects are masked from 'package:lubridate':
##
## %--%, union
##
##
## The following objects are masked from 'package:dplyr':
##
## as_data_frame, groups, union
##
##
## The following objects are masked from 'package:purrr':
##
## compose, simplify
##
##
## The following object is masked from 'package:tidyr':
##
## crossing
##
##
## The following object is masked from 'package:tibble':
##
## as_data_frame
##
##
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
##
##
## The following object is masked from 'package:base':
##
## union
##
##
## Loading required package: ggraph
##
## Loading required package: tidycensus
##
## Loading required package: sf
##
## Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
##
## Loading required package: spdep
##
## Loading required package: spData
##
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
# save the R processing environment, including date in file name
writeLines(
capture.output(sessionInfo()),
here("procedure", "environment", paste0("r-environment-", Sys.Date(), ".txt"))
)