kbenoit / sophistication

R package associated with Benoit, Munger and Spirling (2017) paper(s)
42 stars 7 forks source link

Computer crashed when computing covars #8

Closed kmunger closed 4 years ago

kmunger commented 6 years ago

On a windows 10 machine, when I tried to run

require(sophistication)

require(spacyr)
spacy_initialize()

# sotu addresses
data(data_corpus_sotu, package = "quanteda.corpora")

cbind(covars_make(data_corpus_sotu), 
covars_make_pos(data_corpus_sotu),
covars_make_baselines(data_corpus_sotu, 
                          baseline_year = lubridate::year(docvars(data_corpus_sotu, "Date"))))

My computer froze up completely (to the point where I had to manually restart) and upon rebooting, I saw this error message

r_error

However, when I split the call up into

x1<-covars_make(data_corpus_sotu)
x2<-covars_make_pos(data_corpus_sotu)
x3<-covars_make_baselines(data_corpus_sotu, 
                          baseline_year = lubridate::year(docvars(data_corpus_sotu, "Date")))
sotu_covars <- cbind(x1,
                     x2,
                     x3)

Everything worked fine. Not sure if this is just a memory issue on my machine, thought I'd report it.

sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] spacyr_0.9.9 sophistication_0.65 quanteda_1.2.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.16 pillar_1.2.2 compiler_3.5.0 nloptr_1.0.4 plyr_1.8.4
[6] tools_3.5.0 stopwords_0.9.0 lme4_1.1-17 jsonlite_1.5 lubridate_1.7.4
[11] tibble_1.4.2 gtable_0.2.0 nlme_3.1-137 lattice_0.20-35 rlang_0.2.0
[16] Matrix_1.2-14 fastmatch_1.1-0 brglm_0.6.1 BradleyTerry2_1.0-8 stringr_1.3.1
[21] gtools_3.5.0 qvcalc_0.9-1 grid_3.5.0 reticulate_1.7 data.table_1.11.2
[26] profileModel_0.5-9 minqa_1.2.4 ggplot2_2.2.1 reshape2_1.4.3 magrittr_1.5
[31] scales_0.5.0 splines_3.5.0 MASS_7.3-49 colorspace_1.3-2 xtable_1.8-2
[36] stringi_1.1.7 RcppParallel_4.4.0 lazyeval_0.2.1 munsell_0.4.3