knitr and external R script

#1
Hi,
I have a R script. My plan is to use rmarkdown and import some values and tables from the global environment produced by the R script.
I've been trying to do that, but I always get errors.
I mean, for example, how can I import the values from the vector "zxc" into knitr in order to print it as an HTML file?
Thanks for your comments and time.
 
#3
R script
Code:
BJsales
out1=mean(BJsales)
out2=BJsales[NROW(BJsales)]
Rmarkdown
Code:
---
output:
  html_document:
    df_print: paged
  pdf_document: default
  word_document: default
---

## Details

### The mean of the data was out1 and the last value was out2
Something like that I need to reproduce. I know that I can especify the source R script inside rmarkdown, but I can't make it work.
By the way, the R script has many lines and I'm extracting many values as out1 and out2. I'm taking about 60.