When you ask a question we (JD and/or BB) will often say “Can you send me a (minimal) reproducible example?” (these are sometimes called “reprexes” or abbreviated MWE (minimal working example) or MRE (ditto, reproducible)).
Session > Restart R
) and see the same problem.
Some further resources.
Many of these resources emphasize creating self-contained MREs, i.e. not depending on external data files etc.. That’s less important for this course, where JD/BB have access to your Github repository. You can tell us e.g. “my MRE is in file ‘mre.R’, it uses ‘mydata.csv’, everything is on my repository”. Self-contained MREs are better - they’re generally shorter, and anyone in the course can try them out without access to your repo if you post them to the Teams channel - but not absolutely necessary for this course.fortunes
R package is a compendium of R-related snark. If you like snark, read on.
fortunes::fortune("picketing")
The phrase “does not work” is not very helpful, it can mean quite a few things including:↩
- Your computer exploded.
- No explosion, but smoke is pouring out the back and microsoft’s “NoSmoke” utility is not compatible with your power supply.
- The computer stopped working.
- The computer sits around on the couch all day eating chips and watching talk shows.
- The computer has started picketing your house shouting catchy slogans and demanding better working conditions and an increase in memory.
- Everything went dark and you cannot check the cables on the back of the computer because the lights are off due to the power outage.
- R crashed, but the other programs are still working.
- R gave an error message and stopped processing your code after running for a while.
- R gave an error message without running any of your code (and is waiting for your next command).
- R is still running your code and the time has exceeded your patience so you think it has hung.
- R completed and returned a result, but also gave warnings.
- R completed your command, but gave an incorrect answer.
- R completed your command but the answer is different from what you expect (but is correct according to the documentation).
There are probably others. Running your code I think the answer is the last one.
Greg Snow, R-help (April 2012)