I am newbie to R Markdown. I am using R Studio and am very comfortable with it. I have some R code in an R Markdown file that I am using in R Studio. The code reads a .csv file of streamflow data and calculates the mean flow. I want to export the resulting mean flow to HTML, which is done when I hit the Knit icon. But all I see in the last line of the HTML file is "mean_flow", and the actual numeric value is missing. I understand I need to do this using r in inline mode, which I tried to do using the following r code excerpt:
mean_flow<-mean(daily_flow$Value,na.rm=T)
max_flow<-max(daily_flow$Value,na.rm=T)
min_flow<-min(daily_flow$Value,na.rm=T)
sd_flow<-sd(daily_flow$Value,na.rm=T)
CV_flow<-(sd_flow/mean_flow)*100
mean_flow `r print(mean_flow)
Note: all except " mean_flow r print(mean_flow) " is in one code chunk.