I have some code in my RMarkdown file that I knit:
ifelse(Sys.info()[1]=="Linux",
wdir <- "/path/1",
wdir <- "/path/2")
setwd(wdir)
Except it's supposed to be silent. I've got it in a block with
```{r prepare.data,echo=F,warning=FALSE,message=FALSE,error=FALSE}
I don't want to generate any output from that, yet when I knit, I get this in the output:
## sysname
## "/path/1"
I've tried just that code snip in the console and it is generating that print output.
My Questions are: 1. Why is ifelse printing this output? 2. How can I avoid it?
Thanks!