I'm using R v. 3.3.2 and RStudio v. 1.0.44 on Mac. I love using RMarkdown and the new'ish Notebook flavor of markdown. However, I've recently noticed a new behavior. Line breaks in my R code chunks, are not reflected in the HTML notebook file. For example, a code chunk that looks like this in my .Rmd file:
```{r}
# Creating id for each participant
class_survey$id <- rownames(class_survey)
# Reoder the columns in the data frame so that ID comes first
class_survey <- class_survey[c(44, 1:43)]
# Rename the variables
class_survey <- class_survey %>%
rename(children = Q19_1, gender = Q26, color = Q27)
```
renders like this in the nb.html document:
# Creating id for each participant
class_survey$id <- rownames(class_survey)
# Reoder the columns in the data frame so that ID comes first
class_survey <- class_survey[c(44, 1:43)]
# Rename the variables using dplyr
# new name = old name
class_survey <- class_survey %>%
rename(children = Q19_1, gender = Q26, color = Q27)
I went back to look at some of my "older" nb.html files and found that line breaks used to be preserved. Does anyone know why this behavior changed, and more importantly, if there is a way to change it back?