2016-04-14 12 views
0

Rコードまたは変数値をRマークダウン文書で補間することはできますか?だから私は、値1.28473が単なるテキスト「X =」の後に表示したいRマークダウン文書の変数値を補間する方法

--- 
title: "Behavioural report" 
author: "My name" 
date: "Some date here" 
output: pdf_document 
--- 

```{r echo=FALSE} 
X = 1.28473 
``` 

Suppose that this is my R markdown document and I want to say that the value 
of the variable X = {Here I want the value of X to appear}. And then blah... 

:私のようなものを意味します。

ありがとうございます!

答えて

1

ます。また、インラインの計算を行うことができます{}

`r X` 

の代わりに、以下の使用してみてください:グレート

`r mean(rnorm(50))` 
+0

を!どうもありがとう!! – user2641103