quanteda / readtext

an R package for reading text files
https://readtext.quanteda.io
120 stars 28 forks source link

Install specific version #149

Closed Jeff-Winchell closed 5 years ago

Jeff-Winchell commented 5 years ago

install.packages('readtext') currently installs version .50 devtools::install_github('quanteda/readtext') currently installs version .73

How do I install a specific version (in my case .71 of your library)? I am doing replication work on a research paper that was published using your library and I need to replicate the setup exactly. I am on a Windows machine if that affects your instructions.

Jeff-Winchell commented 5 years ago

I figured it out. (at least for my specific version) devtools::install_github("quanteda/readtext@v0.71") This doesn't work for the version of quanteda package I need, but I will post that in that package's discussion space.

stefan-mueller commented 5 years ago

This should work:

library(devtools)
install_github("quanteda/readtext", ref = "v0.71")
Jeff-Winchell commented 5 years ago

When I do that, and then run library(readtext) I get Error: package or namespace load failed for ‘readtext’ in get(method, envir = home): lazy-load database 'C:/Users/[insertuserhere]/Documents/R/win-library/3.4/readtext/R/readtext.rdb' is corrupt

On Fri, Apr 12, 2019 at 7:40 AM Stefan Müller notifications@github.com wrote:

This should work:

library(devtools) install_github("quanteda/readtext", ref = "v0.71")

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/quanteda/readtext/issues/149#issuecomment-482542858, or mute the thread https://github.com/notifications/unsubscribe-auth/AHBeg5n764ONGRCuWsrgYF-ObQbQy0crks5vgHCmgaJpZM4cr7Mq .

-- Jeff Winchell Computational Social Scientist Jeff_Winchell@g.Harvard.edu http://LinkedIn.com/in/ http://LinkedIn.com/in/FullStackDataScientist ComputationalSocialScientist http://ComputationalSocialScientist.com 551 999 4435

stefan-mueller commented 5 years ago

I do not get this error on my machine (macOS Mojave 10.14.4). Have you tried restarting RStudio and running library(readtext) again (here is a similar issue)? Then, running packageVersion("readtext") will show which version is currently installed.

Jeff-Winchell commented 5 years ago

I did restart rstudio and uninstalled the library and reinstalled it (or some sequence of those events) and now it works. Thanks.

Though now I have another problem replicating the study as I think it incorrectly installed on the authors machine as now when I run emptytexts=unique(c(which(ntoken(human.2011.en)==0),which(ntoken( human.2011.de)==0),which(ntoken(human.2011.fr)==0), which(ntoken(youtube.2011.en)==0),which(ntoken( youtube.2011.de)==0),which(ntoken(youtube.2011.fr)==0), which(ntoken(api.2011.en)==0),which(ntoken(api.2011.de )==0),which(ntoken(api.2011.fr)==0))) I get this message Error in .Call(_quanteda_qatd_cpp_tokens_recompile, texts, types, : Incorrect number of arguments (4), expecting 2 for '_quanteda_qatd_cpp_tokens_recompile'

I assume that is a wrong version problem. I will talk to the author and see what he is getting. Thank you!

On Fri, Apr 12, 2019 at 8:20 AM Stefan Müller notifications@github.com wrote:

I do not get this error on my machine (macOS Mojave 10.14.4). Have you tried restarting RStudio and running library(readtext) again (here https://stackoverflow.com/questions/34593159/failing-to-load-the-new-ggplot2-in-r is a similar issue)? Then, running packageVersion("readtext") will show which version is currently installed.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/quanteda/readtext/issues/149#issuecomment-482553723, or mute the thread https://github.com/notifications/unsubscribe-auth/AHBeg2Oz8RWRx_2rSNGNJlZGC9o2AJYFks5vgHn6gaJpZM4cr7Mq .

-- Jeff Winchell Computational Social Scientist Jeff_Winchell@g.Harvard.edu http://LinkedIn.com/in/ http://LinkedIn.com/in/FullStackDataScientist ComputationalSocialScientist http://ComputationalSocialScientist.com 551 999 4435