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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, isalita
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people, and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
image
Computers and Technology, 22.06.2019 17:40, pnhandley01
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i. e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, tchloe448
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
image
Computers and Technology, 24.06.2019 18:30, trevorhenyan51
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
You know the right answer?
```{r} boxplots <- function(dataframe){ #creates a box plot of all provided data broken down by...

Questions in other subjects:

Konu
Mathematics, 24.02.2020 23:26
Konu
Mathematics, 24.02.2020 23:26