presentcode

suman
28/9/17

Description

This will predict species from input of length and height. training data iris required packages shiny,rsconnect and an account in shinyapps.io runApp() and then publish that is rpresent here

Slide With server Code

library(rpart)
library(e1071)
library(caret)
library(datasets)

calculatespecies <- function (sepal.length, petal.length,sepal.width,petal.width) 
{
  data(iris)
  head(iris)
  c<-train(Species~.,method="rpart",data=iris)
  newdata<-data.frame(Sepal.Length=c(sepal.length),Petal.Length=c(petal.length),Sepal.Width=c(sepal.width),Petal.Width=c(petal.width))

  result <- as.vector(predict(c,newdata))
}

Slide With Plot

User input length and width ofr sepal and petal and the server program will predict the species

Thank you