How to define a matrix,vector and determinent in rmarkdown html document.
Aug 1, 2019 4,659 views

## 1 answer to this question.

Hi Riya,

I have given some examples below for each.

Matrix:

$$\begin{bmatrix}1 & x_{1}\\ 1 & x_{2}\\ 1 & x_{3} \end{bmatrix}$$

Vector:

$$\mathbf{u} = 5\vec u+7\hat y$$

Determinant:

$$\begin{vmatrix}a & b\\ c & d \end{vmatrix}$$

The statements start with $$followed by \beginmath function (or symbol) and characters. A new line is added using \\ and end the math expression with \end and$$

Run these examples and try yourselves.

https://bookdown.org/yihui/rmarkdown/markdown-syntax.html

answered Sep 17, 2019 by rahul

edited Sep 17, 2019

## How can I avoid the transformation into an atomic vector in a matrix (r programming)

I'm scrambling to come up with a ...READ MORE

+1 vote

## Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE ...READ MORE

## In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

+1 vote

## How to count the number of elements with the values in a vector?

Use dplyr function group_by(). > n = as.data.frame(num) > ...READ MORE

## Display only output and caption with any warnings or code in Rmarkdown

Use echo=FALSE and fig.cap = "caption in ...READ MORE

## display the output r code as title in R script Rmarkdown script to html page

Use the file input from parameter and ...READ MORE

## parameterized reports using RMarkdown

@pragyat, Remove " " around data value in ...READ MORE