subject

```{r} boxplots <- function(dataframe){ #creates a box plot of all provided data broken down by column name
par(mar=c(7,5,1,1))
boxplot(dataframe)
}
boxplots(dataframe)

boxplotspec <- function(dataframe){ #creates a box plot for each species
dfsub1 <- subset(dataframe, Species == "versicolor")
dfsub2 <- subset(dataframe, Species == "setosa")
dfsub3 <- subset(dataframe, Species == "virginica")
par(mfrow=c(1,3),mar=c(6,3,2,1))
boxplot(dfsub1[,1:4], main="Versicolor",ylim = c(0,8),las=2)
boxplot(dfsub2[,1:4], main="Setosa",ylim = c(0,8),las=2)
boxplot(dfsub3[,1:4], main="Virginica",ylim = c(0,8),las=2)
}
boxplotspec(dataframe)

histplot <- function(dataframe){ #creates a histogram of all species using the data provided
hist(dataframe$Petal. Length)#to change the data in the plots, replace "Petal. Length" with the desired data column name
par(mfrow=c(1,3))
}
histplot(dataframe)

histplotsspec <- function(dataframe){ #creates histograms of each species.
dfsub1 <- subset(dataframe, Species == "versicolor")
dfsub2 <- subset(dataframe, Species == "setosa")
dfsub3 <- subset(dataframe, Species == "virginica")
hist1 <- hist(dfsub1$Petal. Length, breaks=seq(0,8,l=17),xlim=c(0,8),yl im=c(0,40))
hist2 <- hist(dfsub2$Petal. Length, breaks=seq(0,8,l=17),xlim=c(0,8),yl im=c(0,40))
hist3 <- hist(dfsub3$Petal. Length, breaks=seq(0,8,l=17),xlim=c(0,8),yl im=c(0,40))
#to change the data in the plots, replace "Petal. Length" with the desired data column name
}
histplotsspec(dataframe)

treeunprun <- function(dataframe){ #creates an unpruned decision tree from the data
input <- dataframe[,1:4]
output <- dataframe[,5]
model1 <- C5.0(input, output, control = C5.0Control(noGlobalPruning = TRUE, minCases=1))
plot(model1, main="C5.0 Decision Tree - Unpruned, min=1")
}
treeunprun(dataframe)

treeprun <- function(dataframe){ #creates a pruned decision tree from the data
input <- dataframe[,1:4]
output <- dataframe[,5]
model2 <- C5.0(input, output, control = C5.0Control(noGlobalPruning = FALSE))
plot(model2, main="C5.0 Decision Tree - Pruned")
}
treeprun(dataframe)
```
Quitting from lines 45-94 (6,2-FunctionsRMARKDOWN. Rmd)
Error in eval(parse(text = paste(obj$call)[xspot])) :
object 'input' not found
Calls: ... as. party -> as. party. C5.0 -> data. frame -> eval -> eval

Execution halted

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories is this true or false?
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
What are the charges for invasion of privacy on computers
Answers: 1
question
Computers and Technology, 25.06.2019 04:50
Your program should prompt the user for the dimensions of the two squares matrices, making sure that the user input is greater than or equal to 4.[ yes, an example would be a4x4matrix]2.if the above is not met, prompt the user for a new value.3.now generate random integernumbers to fill both matrices.4.display these two matrices on the screen.5.multiply the two matrices and display the result on the scre
Answers: 2
You know the right answer?
```{r} boxplots <- function(dataframe){ #creates a box plot of all provided data broken down by...
Questions
question
Chemistry, 16.10.2020 15:01
question
English, 16.10.2020 15:01
question
Mathematics, 16.10.2020 15:01
Questions on the website: 13722367