dtkaplan / TeachStatsWithR

Materials for the MOSAIC "Teaching Statistics with R and RStudio"
23 stars 35 forks source link

Line 98, Chunk 1 argument has length 0 #8

Open fjaraavilaa opened 7 years ago

fjaraavilaa commented 7 years ago

When running the Students Manual it shows this error. Ran with the TeX document generated. Shows this error: ! LaTeX Error: File `Sweave.sty' not found. Likely a needed change with the most updated version of knitr.

rpruim commented 7 years ago

Do you have RStudio configured to use knitr rather than Sweave?

nicholasjhorton commented 7 years ago

Are there any old-style Sweave options or values hiding in there? See https://yihui.name/knitr/demo/sweave/ for info on sussing these out.

nicholasjhorton commented 6 years ago

I would argue that library() is preferable. I found that the following as helpful:

https://stackoverflow.com/questions/5595512/what-is-the-difference-between-require-and-library

WHICH STATES:

It is probably best to avoid using require() unless you actually will be using the value it returns e.g in some error checking loop such as given by thierry.

In most other cases it is better to use library(), because this will give an error message at package loading time if the package is not available.

rpruim commented 6 years ago

But library() is such a bad name for newbies, and I don't find error-generation to be compelling. They will get errors as soon as they try to do something with the package, and when working interactively, the messaging from require() is also sufficient.

nicholasjhorton commented 6 years ago

While I agree with the name preference most others in the community are using library() and I agree with them that require() is most appropriate if you are going to look at the return status. Finally I want an r markdown file to fail compilation if a needed package isn’t installed (as opposed to generating a bunch of messages).

All the best,

Nick

On Jun 8, 2018, at 2:36 PM, Randall Pruim notifications@github.com wrote:

But library() is such a bad name for newbies, and I don't find error-generation to be compelling. They will get errors as soon as they try to do something with the package, and when working interactively, the messaging from require() is also sufficient.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.