जब मैं प्रश्न उत्पन्न करने के लिए पैकेज exams का उपयोग कर रहा हूं, तो मैं इसे विशेष वर्णों के साथ भी अंग्रेजी में पूरी तरह से कर सकता हूं। उदाहरण के लिए, एक RNW सवाल है कि मैं परीक्षा पैकेज के साथ संकलन कर सकते हैं:पुर्तगाली उच्चारण के साथ आर पैकेज परीक्षा का उपयोग कैसे करें?
<<echo=FALSE, results=hide>>=
## DATA GENERATION
P <- round(runif(n = 1, min = 1000, max = 2000), digits = 2)
S <- round(runif(n = 1, min = P + 500, max = 3000), digits = 2)
## QUESTION/ANSWER GENERATION
i <- round((S - P)/P, digits = 2)*100
@
\begin{question}
Qual \'e a taxa de juros simples obtida por uma aplica\c{c}\~ao de \textdollar $\Sexpr{P}$ que, ap\'os um ano, produz um montante de \textdollar$\Sexpr{S}$?
\end{question}
\begin{solution}
Os juros s\~ao calculados por:
\begin{equation}
S = P(1+i \times n) \Rightarrow S = P + Pin \Rightarrow
\end{equation}
\begin{equation}
Pin = S - P \Rightarrow
i = \frac{S-P}{Pn} \Rightarrow i = \frac{S-P}{P}
\end{equation}
O valor absotulo dos juros \'e $\Sexpr{i}$\%.
\end{solution}
%% META-INFORMATION
%% \extype{num}
%% \exsolution{\Sexpr{fmt(abs(tstat), 3)}}
%% \exname{t statistic}
%% \extol{0.01}
उदाहरण के लिए, जब मैं ç मैं बस का उपयोग \ ग {c} और इतने पर की जरूरत है। लेकिन, मैं आरएनडब्ल्यू फाइलों के बजाय रमार्कडाउन का उपयोग करने की कोशिश कर रहा हूं। और आरएमडी में एक ही उदाहरण:
---
output: pdf_document
---
```{r data generation, echo = FALSE, results = "hide"}
P <- round(runif(n = 1, min = 1000, max = 2000), digits = 2)
S <- round(runif(n = 1, min = P + 500, max = 3000), digits = 2)
i <- round((S - P)/P, digits = 2)*100
```
Question
========
Qual é a taxa de juros simples obtida por uma aplicação de $`r P`
Solution
========
Os juros são calculados por:
\begin{equation}
S = P(1+i \times n) \Rightarrow S = P + Pin \Rightarrow
\end{equation}
\begin{equation}
Pin = S - P \Rightarrow
i = \frac{S-P}{Pn} \Rightarrow i = \frac{S-P}{P}
\end{equation}
O valor absotulo dos juros é `r i`%.
Meta-information
================
extype: num
exsolution: `r round(i, digits = 3)`
exname: Euclidean distance
extol: 0.01
मैं लहजे सही ढंग से दिखा RStudio साथ संकलन कर सकते हैं:
लेकिन जब मैं कोशिश:
exams2pdf('file.Rmd', encoding = 'utf8')
यह काम doen't ।
कोई मुझे इस मुद्दे के साथ मदद कर सकते हैं?
धन्यवाद @MartinDabbelJuSmelter! इसने काम कर दिया। मुझे लगता है कि हमें इसे पैकेज के दस्तावेज़ीकरण में जोड़ना चाहिए। –