-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with PrepText function using example sotu data #11
Comments
Hi, I also have the same problem, here what I got when try to run this code
Here is my section Information. Thank you in advance,
|
same, even though the data are characters or character lists, doesn't matter which dataset, the same error persists. |
it seems like it's an issue with unnest_tokens within the function, there are some help pages but it's not clear how to resolve it. Still looking into it ... |
@Dat-Vuong07 @angelhsu05 If that is not a problem, please set |
Yes, I was using the 'sotu' dataset from the package and so am not reading the data in from csv, but instead loading directly from the package. Changing I can use the I am also getting a message that |
Have you checked datatype of the sotu being loaded ? Particularly, the textvar that you are going to use. |
Hi @yl17124 , I also have the same problem. Here is my code. I already changed the
And this is the results 1. The
2. However, it can't run the
Below is my session Information
|
yes, the |
You need to change the "sotu_text" variable name to "textvar" to make it work. I had the same issue and it wasn't until I saw under the hood of the PrepText function how the input was evaluated in the unnest_tokens_ function (which is deprecated, BTW). |
Hi folks- thanks for pitching in to answer this question, I'm sorry I was not available I am busy planning for a major educational event this summer (the Summer Institutes in Computational Social Science: https://compsocialscience.github.io/summer-institute/). Ok to close this now @angelhsu05 ? Or is it still not working. |
yes that was the trick, thanks @sotork! Perhaps worth updating the example code snippet below:
|
@angelhsu05 |
Hi all- I'm unable to reproduce this error. I want to make sure I am following the solution correctly-- did you wind up changing textvar="textvar" in order to make it work? Does that mean you renamed the variable in the sotu dataset? |
Yes Chris...I renamed it. It was "sotu_text", it needs to be "textvar" to make the function work. |
I was having the exact same issue as everyone else on this thread. Renaming This fails:
This functions:
|
Hi all: I just pushed a fix for this (it turned out to be an issue with variable indirection created by R 4.0). Could one or more of you please try a fresh install (and try rerunning the example code) to verify that you no longer need to change the |
It runs without the |
I’m getting an “Check_input” error when I try to run PrepText using the sotu example, even though the text is type character. I tried creating my own tf-idf data frame using tidy text so I could still use the visualization functions in this package but I wasn’t sure what the outputs of PrepText and CreateTextnet look like to troubleshoot. Thanks for your help!
The text was updated successfully, but these errors were encountered: