This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
Patients <- c("patient1", "patient2", "patient3", "patient4")
IRX4 <- c(11,13,2,1)
OCT4 <- c(10,13,4,3)
PAX6 <- c(1,3,10,9)
Gene <- data.frame(Patients, IRX4, OCT4, PAX6, stringsAsFactors = FALSE)
Gene
## Patients IRX4 OCT4 PAX6
## 1 patient1 11 10 1
## 2 patient2 13 13 3
## 3 patient3 2 4 10
## 4 patient4 1 3 9
dist(Gene, method = "manhattan", diag = FALSE, upper = FALSE, p=2)
## Warning in dist(Gene, method = "manhattan", diag = FALSE, upper = FALSE, : NAs
## introduced by coercion
## 1 2 3
## 2 9.333333
## 3 32.000000 36.000000
## 4 33.333333 37.333333 4.000000
dist(Gene, method = "euclidean", diag = FALSE, upper = FALSE, p=2)
## Warning in dist(Gene, method = "euclidean", diag = FALSE, upper = FALSE, : NAs
## introduced by coercion
## 1 2 3
## 2 4.760952
## 3 16.248077 18.293897
## 4 16.852300 19.321836 2.000000
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.