I have problem with the alignment of the codes in two column slide.
Here is my code for this slide,
--- &twocol
## Sample R Codes
*** =left
```{r, echo=FALSE}
options(width=30)
```
```{r, fig.height=5.5,highlight=TRUE, fig.show='hide',tidy=TRUE}
mvreg.sim <- function(xcov,beta1=matrix(c(0.7, 0.2, 0.2, 0.7),
nr = 2, nc = 2), err.mu=c(0,0),
err.sigma=matrix(c(100,0,0,100), nr=2)){
library(mvtnorm)
N <- nrow(xcov)
e <- rmvnorm(N, mean = err.mu, sigma = err.sigma)
y <- matrix(NA, nrow = N, ncol = 2)
for(i in 1:N){
y[i,] <- (xcov[i,])%*%beta1 + e[i,]
}
return(y)
}
```
*** =right
This is the explanation of the plot.
```{r, fig.height=5.5,highlight=TRUE,echo=FALSE}
x <- seq(0,10, by = 0.01)
y <- x
plot(x, sin(y), xlab = 'x-axis', ylab = 'sin(x)', main = 'Sample Plot')
```
I am new to slidify with little knowledge on html. I use tidy=TRUE
with options(width=60)
to control the width of the codes inside the box, but the alignment somehow is affected. I want the alignment set to right justified. Any help is greatly appreciated.