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:
factorial = 1
for (i in 12:1)
{factorial=factorial*i}
print(factorial)
## [1] 479001600
numvec<-seq(20,50, by=5)
numvec
## [1] 20 25 30 35 40 45 50
factorial<-function(a, b, c)
{
x1=(-b+(b^2 - 4*a*c)^(1/2))/(2*a)
x2=(-b-(b^2 - 4*a*c)^(1/2))/(2*a)
print(x1)
print(x2)
}
factorial(2, 7, 4)
## [1] -0.7192236
## [1] -2.780776