koncina / unilur Goto Github PK
View Code? Open in Web Editor NEWA rmarkdown template to create tutorials/practicals or examination papers.
Home Page: http://koncina.github.io/unilur/
A rmarkdown template to create tutorials/practicals or examination papers.
Home Page: http://koncina.github.io/unilur/
Hi! I am using this package for a class that I'm teaching (it's great), but I can't seem to find a way to get tables from R to print in the PDF/LaTeX document.
The following runs fine:
print(xtable::xtable(data))
The following fails:
print(xtable::xtable(data))
! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...
pandoc fails with error 43.
Any thoughts would be greatly appreciated!
Thank you for this very nice package that I used following the advice of @ginolhac
This package would be even better if it provided some customization features for the users such as
Writing R code chunks perfectly worked using unilur:tutorial. But, with unilur:examen, I have an error. See below:
mean(cars$speed)
! LaTeX Error: Command \framed already defined.
Or name \end... illegal, see p.192 of the manual
Error: Failed to compile 2_Central_Tendency_Exercises.tex. See 2_Central_Tendency_Exercises.log for more info.
Execution halted
The thing is that I would like to use the mcq options from unilur:examen AND r chunks. As mcq options are not working for unilur:tutorial, I decided to use unilur:examen instead. But still, I have issues. Is it an issue with the unilur? Or a mistake from my side?
Hi,
I run: devtools::install_github("koncina/unilur")
and the output is:
Downloading GitHub repo koncina/unilur@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
no fue posible abrir la URL 'https://api.github.com/repos/koncina/unilur/tarball/HEAD'
¿could you help me? Your templates ir really nice and usefull for me. Thanks!
Hi, I love unilur and have been using it for a while. Thank you for creating this package. However, I recently updated my RStudio and R and I am getting the following error for unilur installation. Can you please help?
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
devtools::install_github("koncina/unilur")
Downloading GitHub repo koncina/unilur@master
cygwin warning:
MS-DOS style path detected: C:\Users\sab2028\AppData\Local\Temp\RtmpWcjlJq\filed2864e0608b.tar.gz
Preferred POSIX equivalent is: /cygdrive/c/Users/sab2028/AppData/Local/Temp/RtmpWcjlJq/filed2864e0608b.tar.gz
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Error: Does not appear to be an R package (no DESCRIPTION)
Let's say I have some Latex code in my markdown doc, such as
$$
\begin{tabular}{|c|c|c|}
\hline
& Blue eyes & Brown eyes\tabularnewline
\hline
Light hair & 38 & 11\tabularnewline
\hline
Dark hair & 14 & 51\tabularnewline
\hline
\end{tabular}
$$
The knitting returns an error
! FancyVerb Error:
Extraneous input `\begin {Verbatim}[commandchars=\\\{\}]\end {}' between \end
{Verbatim} and line end
.
\FV@Error ... {FancyVerb Error:
\space \space #1
}
l.543 ...tim}\begin{Verbatim}[commandchars=\\\{\}]
pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted
should I include those code lines in a r asis = TRUE
chunk?
Hello, it's me again.
I'm working on a cartography tutorial with unilur and I'm having problems with displaying interactive maps with the leaflet package.
I wonder if there is a way to solve the problem easily? Do you think this issue concerns all html widgets? Thanks a lot for your help!
Working with html_document output
---
title: "html_output"
author: "antuki"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(leaflet)
leaflet() %>% addTiles()
```
Not working with unilur tutorial_html_solution output... :
---
title: "unilur_output"
author: "antuki"
output:
unilur::tutorial_html_solution
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(leaflet)
leaflet() %>% addTiles()
```
If a global knitr
CACHE option is to TRUE
like this:
knitr::opts_chunk$set(cache = TRUE)
no solution are displayed for the html output. Works fine with the pdf output.
Setting knitr::opts_chunk$set(cache = FALSE)
solves the issue
Hi Eric,
Thank you so much for this interesting package.
I am wondering whether one can incorporate inline r code within the block chunk?
From my testing, block chunk seems to be using a markdown/asis engine or equivalent.
Thanks!
kind regards,
Thomas
for html output this is great:
```{css, echo = FALSE}
.bonus {
border-left: 10px solid rgba(188, 143, 143, 1);
padding: 1em 0 1em 1em;
}
```
#### bonus question {.bonus}
would be awesome to have it working for pdf output
When I have a setup chunk that sets echo=FALSE, this seems to override the solution=TRUE option, unless I define echo=TRUE in each solution chunk. In the example test.txt file below (actually an .Rmd file but I could only upload txt), the first solution does not show. The second does. If nothing else, maybe just let folks know that this is an issue..
would be nice to have marks add numbers specified in each chunk solution = TRUE
.
Would be even greater if those numbers are sum up for each section
Thanks for an amazing tool!
I was wondering if it is possible to run inline r within a block chunk. My solutions often require interpretation of coefficients, and it would be nice to do "The coefficient is 'r mod$coef '. "
so lightblue
and other would be working with pdf output
Hello!
I was wondering if it was possible to make two slight modifications to the package.
tutorial_pdf_base <- function(solution = FALSE,
solution_suffix = "_solution",
question_suffix = "_question",
credit = FALSE, # Show a link to the unilur homepage
latex_class = "article",
pandoc_args = NULL, ...
Similarly, is it possible to specify the path to a custom header? (I.e. given a different filepath to header_examen)
header_examen <- system.file("rmarkdown", "templates", "tutorial", "resources", "header_examen.tex",
package = "unilur")
With and without solutions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.