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:
Genes <- data.frame( IRX4=c(11,13,2,4),OCT4=c(10,13,4,3),PAX6=c(1,1,3,9))
rownames(Genes)<- c("patient1","patient2","patient3","patient4")
print(Genes)
## IRX4 OCT4 PAX6
## patient1 11 10 1
## patient2 13 13 1
## patient3 2 4 3
## patient4 4 3 9
?dist
## starting httpd help server ... done
manhattan_dist<-dist(Genes, method="manhattan")
print(manhattan_dist)
## patient1 patient2 patient3
## patient2 5
## patient3 17 22
## patient4 22 27 9
euclidean_dist<-dist(Genes, method="euclidean")
print(euclidean_dist)
## patient1 patient2 patient3
## patient2 3.605551
## patient3 11.000000 14.352700
## patient4 12.727922 15.652476 6.403124
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.