Comments (6)
Thanks for everything! I dealt with problems with other chapters last night.
from cc21.
Can you remember which rmd file uses this package?
from cc21.
The issue here is that rJava
is hard to install on Ubuntu, which is the OS that GitHub Actions is using. That is the reason I didn't include qdap
before... sorry I forgot to mention that. I'll try to figure out how to do it. In the meantime, just set the code chunks that use qdap
to eval=FALSE
and put in a comment in those chunks explaining the issue.
from cc21.
Copying my comment from here: 1691bc5
@jtr13 I was trying to figure out what was going with the latest error here.
https://github.com/jtr13/cc21/runs/2198706265?
In particular, this message:
Quitting from lines 145-151 (sentiment_analysis_and_wordcloud.Rmd)
Error in menu(choices = c("Yes", "No"), title = title) :
menu() cannot be used non-interactively
Calls: local ... get_sentiments -> <Anonymous> -> load_dataset -> printer -> menu
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) :
Failed to compile sentiment_analysis_and_wordcloud.Rmd
Calls: <Anonymous> -> render_new_session -> Rscript_render
Execution halted
The problem seems to be line 148. It derives from the fact that this line asks for user input.
See this similar issue on stackoverflow: https://stackoverflow.com/questions/57225210/sentiments-dataset-in-r-throwing-error-with-afinn-lexicon
from cc21.
Okay, I tried to replicate it in RStudio. It doesn't run as a rmd file. But I was able to run it as a simple R file.
The problem comes from the fact that in the following code block, this code get_sentiments('nrc')
attempts to download a large data file but requires a user confirmation. This requirement for user input probably won't work here.
videogame %>%
select(id,review) %>%
unnest_tokens(output = word, input = review) %>%
inner_join(get_sentiments('nrc')) %>%
group_by(sentiment) %>%
count()
I think we should ask the submitter to either leave this part out or load the file in a different way that does not require manual user activity.
from cc21.
Exactly. Since the chapter was already merged I figured it was on us to fix it. I just added a note to the chapter and added eval=FALSE
to the the two code chunks that use nrc. Often there's a way around these things but they are very explicit that they don't want to allow non-interactive downloads of the lexicons due to licensing issues: EmilHvitfeldt/textdata#19
I was able (finally) to get rJava
to work by adding
sudo apt install \
default-jre \
default-jdk
sudo R CMD javareconf
to the GitHub Actions .yaml
file.
Now it's failing due to problems with other chapters.
from cc21.
Related Issues (8)
- Figure out how to add packages to DESCRIPTION
- Problem with library(TSA) command during build HOT 2
- Issue with yaml::yaml.load HOT 2
- Errors in R chapter HOT 4
- Rmd file merged in jtr/cc21 but new pull requests changed link inside it HOT 3
- Wrong hashtag in https://github.com/jtr13/cc21/blob/main/common_r_errors.Rmd HOT 1
- Check build HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cc21.