I am using overleaf to compile my R codes into a pdf file. For a chunk of code, we use for example:
<<>>=
mean(reading)
max(reading)
min(reading)
@
But now I want to use these commands inline. I want my output to be like:
"The mean of the data is mean(reading)
, the maximum is max(reading)
, and the minimum is min(reading)
", where the mean(reading)
etc will directly print the output of the command inline. But I don't quite know how to do that.
Please help, and I apologize if this seems trivial, for I am quite new to R.
THANK YOU