Hello users of ReadMe,
We are moving the discussion on this mailing list to Github. For discussing ReadMe, asking questions, or suggesting features, please use our Github discussions: https://github.com/iqss-research/ReadMeV1/discussions. To report any bugs, please fill out this form: https://github.com/iqss-research/ReadMeV1/issues/new.
Thank you,
Zagreb Mukerjee
Research Data Scientist
Institute for Quantitative Social Science, Harvard University
Hi Sophie, probably it is how you have python installed, but there's a
readme2 now and accompanying paper. I suggest you have a look:
http://garyking.org/words
Gary
--
*Gary King* - Albert J. Weatherhead III University Professor - Director,
IQSS <http://iq.harvard.edu/> - Harvard University
GaryKing.org <http://garyking.org/> - King(a)Harvard.edu - @KingGary
<https://twitter.com/kinggary> - 617-500-7570 - Assistant
<king-assist(a)iq.harvard.edu>: 617-495-9271
On Mon, Mar 2, 2020 at 6:47 PM Sophie Li <sophieli(a)princeton.edu> wrote:
> Hi! I'm having an issue with the ReadMe software, where using the
> undergrad() function results in RStudio processing the code forever and
> then crashing. I've looked through the listserv archives and tried to add
> python3=TRUE as an argument in undergrad(), but I get an error message
> saying:
>
> Error in undergrad(sep = ",", stem = F, alphanumeric.only = F, threshold =
> 0.001, :
> unused arguments (sep = ",", stem = F, alphanumeric.only = F, threshold
> = 0.001, python3 = TRUE)
>
> (^ this is code from the replication data
> <https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/QS…>
> for *How the Chinese Government Fabricates Social Media Posts for
> Strategic Distraction, not Engaged Argument*)
>
> I have version 1.1.456 of RStudio and version 3.8 of Python. Would anyone
> be able to assist with this? Happy to provide more information if needed!
>
> Thanks a ton!
>
> Best,
> Sophie
>
> --
> *Sophie Li *
> Princeton University | Class of 2021
> Department of Politics
> m: (609) 865 8876 | sophieli(a)princeton.edu
>
Hi! I'm having an issue with the ReadMe software, where using the
undergrad() function results in RStudio processing the code forever and
then crashing. I've looked through the listserv archives and tried to add
python3=TRUE as an argument in undergrad(), but I get an error message
saying:
Error in undergrad(sep = ",", stem = F, alphanumeric.only = F, threshold =
0.001, :
unused arguments (sep = ",", stem = F, alphanumeric.only = F, threshold =
0.001, python3 = TRUE)
(^ this is code from the replication data
<https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/QS…>
for *How the Chinese Government Fabricates Social Media Posts for Strategic
Distraction, not Engaged Argument*)
I have version 1.1.456 of RStudio and version 3.8 of Python. Would anyone
be able to assist with this? Happy to provide more information if needed!
Thanks a ton!
Best,
Sophie
--
*Sophie Li *
Princeton University | Class of 2021
Department of Politics
m: (609) 865 8876 | sophieli(a)princeton.edu
Dears:
I have the following error when I run Readme algorithm, do you know what is
happening?
*> readme.results <- readme(undergrad.preprocess)*
*list()*
*Error in sample.int <http://sample.int>(length(x), size, replace, prob) : *
* NA in probability vector*
*In addition: Warning messages:*
*1: In tt[1] * tt[2] : NAs produced by integer overflow*
*2: In tt[1] * tt[2] : NAs produced by integer overflow*
Thanks.
Florencio
Hello,
I have run through the installation instructions for unix/linux, and I am
currently trying to run the clinton demo. When it gets to the
readme.results, I am given the error:
Loading required package: quadprog
Error:
Require Quadractic Programming package 'quadprog'
I would appreciate any suggestion.
Thank you,
Justin
Hi! I'm new here.
I'm trying to use the command "demo(clinton)" in windows, but an error
occurs: ... Python module failed....
I've seen that others have had the same problem, how can I solve it?
Thank you!
Mat
Dear ReadMe users,
I have two questions I am looking for help with. I am working with a
stratified sample of articles in which the probability of selection into
the sample varies for different types of articles. Does anyone know of a
good way to weight articles for analysis in ReadMe to get a better estimate
of category proportions in the population of articles from which the sample
was drawn? The only thing I could think of so far is to duplicate articles
to attain the proper relative weights (specifically, three different strata
of articles had a 10%, 15%, and 100% probability of being included in the
sample so I duplicated these 30, 20, and 3 times respectively), but this
seems like a crude weighting scheme that could have undesirable
consequences.
Secondly, for this same sample of articles, I want to look at change in
category proportions over time (years) from 1980-2012. The full sample
(about 1,200 articles) has been hand-coded for 1980-2010, but I want to use
ReadMe to cross-validate the hand-coded estimates of category proportions
over time. Some of the year samples are so small (< 50 articles) that the
ReadMe analysis won't even converge, but I can achieve convergence by
pooling years (it seems to converge when there are at least 70 articles or
so). Does a sample of that size, ~70 articles, with about a 1/3 trainingset
(although I could change that) pose problems for the validity of the ReadMe
results, or can I expect to achieve relatively unbiased estimates even with
a small sample?
Thanks for any guidance,
Derek
--
Derek Burk
PhD Candidate
Department of Sociology
Northwestern University
Dear all,
After spending a few week trying to figure out the problem with the ReadMe
package when run under windows, I have just found the following fix.
The main culprit preventing your Windows OS from properly accessing the
makerfile is due to the 'single quotes' that are added to the file path in
the undergrad script (e.g. 'C:\python27\python.exe' instead of just
C:\python27\python.exe). This also becomes a problem when the script
accesses the control.txt and tablefile.txt files.
This might be fine (or even required) under other OSes, but under Windows
this actually becomes problematic due to the way the OS reads file paths.
Therefore I have devised the following (temporary) fix:
Note 1 This fix assumes that you have installed Python 2.xx or 3.xx and
have properly configured your PATH environmental variable). I have tested
this fix with the most recent R versions
Note 2 I recommend implementing this under Rstudio because it displays line
numbers, but this is also doable under the vanilla Rgui
Note 3 I only write about the minimum amount of fixes you need in order to
properly run the undergrad function (which is necessary if you were to run
the demo(clinton) script), but I have yet to test whether the ReadMe script
needs further modification for windows when deciding to run other datasets
with different operators.
1 start R
2 load the Readme package --> library(ReadMe)
3 type the following command --> fix(undergrad)
4 find line 10-12, which shows the Python2 (makerfile) lines of code:
if (python3 == FALSE) {
call <- paste(system.file("'","makerfile", package = "ReadMe"), *"'"
* sep = "")
}
5 remove the double quotes + singles quotes + the extraenous commas between
the system.file() brackets. This leaves just the following code (note that
R does not care much about the spaces or tabs that you'll delete):
if (python3 == FALSE) {
call <- paste(system.file("makerfile", package = "ReadMe"), sep =
"")
}
6 repeat the same procedure for line 14-16 (this fixes the Python3
makerfile), which results in
else {
call <- paste(system.file("makerfile3-0.py", package = "ReadMe"),
sep = "")
}
7 Do this also for the control-file (lines 43-44) and the table-file (lines
45-46), this should result in the following lines of code:
call <- paste(call, "--control-file", paste(control, sep = ""))
call <- paste(call, "--table-file", paste(table.file, sep = ""))
8 Save your modifications (under Rgui you will be prompted with save when
you close the edit window).
9 Run demo(clinton)
Final note:
This fix for the undergrad function is temporary until you restart R. You
could technically save the fixes on a permanent basis or write an script
that automatically runs at start-up, but I just save the modified script in
a separate text file and copy/paste it whenever I need to run the ReadMe
package. Either way, until the makers of the ReadMe fix the undergrad
function for windows you'll have to modify the undergrad function by
yourself.
With Regards,
Cômeng Tang BSc
Leiden University
East Asian Studies
> ---------- Forwarded message ----------
> From: <readme-request(a)lists.gking.harvard.edu>
> Date: Wed, Oct 2, 2013 at 6:00 PM
> Subject: Readme Digest, Vol 8, Issue 1
> To: readme(a)lists.gking.harvard.edu
>
>
> Send Readme mailing list submissions to
> readme(a)lists.gking.harvard.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gking.harvard.edu/mailman/listinfo/readme
> or, via email, send a message with subject or body 'help' to
> readme-request(a)lists.gking.harvard.edu
>
> You can reach the person managing the list at
> readme-owner(a)lists.gking.harvard.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Readme digest..."
>
>
> Today's Topics:
>
> 1. Re: Python error on demo(clinton) (Enrico Borghetto)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 1 Oct 2013 16:38:28 +0100
> From: Enrico Borghetto <borghenry(a)gmail.com>
> To: readme(a)lists.gking.harvard.edu
> Subject: Re: [readme] Python error on demo(clinton)
> Message-ID:
> <CAOZTqvLA+GZ=
> b7Dj5215AmPhyKjssgOjSHt1wxfjAk_hj5LDSg(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Daniel,
>
> thank you for your suggestions to solve the error on demo(clinton). I
> checked that:
>
> 1) Python is installed before R and in the path - when I type "python" on
> the command line, it starts running
> 2) My version of Python is 2.7.5
>
> Yet, running the demo in RStudio (0.97.551) and R (3.0.2) I still get the
> error:
>
> > demo(clinton)
>
>
> demo(clinton)
> ---- ~~~~~~~
>
> Type <Return> to start :
>
> > oldwd <- getwd()
>
> > setwd(system.file("demofiles/clintonposts", package="ReadMe"))
>
> > undergrad.results <- undergrad(sep = ',')
> [1] "python
> 'C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'
> --alphanumeric-only --separator \",\" --control-file 'control.txt'
> --table-file 'tablefile.txt' --threshold 0.01"
> C:\Python27\python.exe: can't open file
> ''C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'': [Errno
> 22] Invalid argument
> Error in undergrad(sep = ",") : Python module failed. Aborting undergrad.
> In addition: Warning message:
> running command 'python
> 'C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'
> --alphanumeric-only --separator "," --control-file 'control.txt'
> --table-file 'tablefile.txt' --threshold 0.01' had status 2
>
> Any idea?
>
> Thanks a lot
>
> Enrico
>
> --
> Enrico Borghetto, PhD
> Post-Doctoral Fellow
> Cesnova - Centro de Estudos de Sociologia da Universidade Nova de Lisboa
> NOVA University of Lisbon
> Personal Website <http://enricoborghetto.weebly.com/>
> Italian Policy Agendas <http://italianpolicyagendas.weebly.com/>
> Center for the Observation of Legislatures <http://www.coolresearch.net/>
> Italian Law Making Archive <http://159.149.130.120/ilma/sito/>
>
Dear Daniel,
thank you for your suggestions to solve the error on demo(clinton). I
checked that:
1) Python is installed before R and in the path - when I type "python" on
the command line, it starts running
2) My version of Python is 2.7.5
Yet, running the demo in RStudio (0.97.551) and R (3.0.2) I still get the
error:
> demo(clinton)
demo(clinton)
---- ~~~~~~~
Type <Return> to start :
> oldwd <- getwd()
> setwd(system.file("demofiles/clintonposts", package="ReadMe"))
> undergrad.results <- undergrad(sep = ',')
[1] "python
'C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'
--alphanumeric-only --separator \",\" --control-file 'control.txt'
--table-file 'tablefile.txt' --threshold 0.01"
C:\Python27\python.exe: can't open file
''C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'': [Errno
22] Invalid argument
Error in undergrad(sep = ",") : Python module failed. Aborting undergrad.
In addition: Warning message:
running command 'python
'C:/Users/Borghetto/Documents/R/win-library/3.0/ReadMe/makerfile'
--alphanumeric-only --separator "," --control-file 'control.txt'
--table-file 'tablefile.txt' --threshold 0.01' had status 2
Any idea?
Thanks a lot
Enrico
--
Enrico Borghetto, PhD
Post-Doctoral Fellow
Cesnova - Centro de Estudos de Sociologia da Universidade Nova de Lisboa
NOVA University of Lisbon
Personal Website <http://enricoborghetto.weebly.com/>
Italian Policy Agendas <http://italianpolicyagendas.weebly.com/>
Center for the Observation of Legislatures <http://www.coolresearch.net/>
Italian Law Making Archive <http://159.149.130.120/ilma/sito/>
I saw several messages on this list regarding an error using the demo in the manual regarding "Python module failed". Other than checking that Python is installed before R and in the path, the error might be due to the python3=FALSE default in undergrad(), so using a <3.0 Python for the demo might help (and then if you want to use Python >= 3.0, just use python3=TRUE in the undergrad() function).
Dan Wright