saving . . . saved Conditional Statements has been deleted. Conditional Statements has been hidden .
Conditional Statements
Title
Question
Count all such Species.
Answer for Assignment Question

R Conditional-Statements 09-10 min 0-10 sec 30-04-20, 12:53 p.m. bvs.nnsvidya@gmail.com

Answers:

Count = 0
Species = vector(mode = "character",length = nrow(iris))
for(i in 1:nrow(iris))
{
if(iris$Sepal.Length[i]>iris$Petal.Length[i])
{
Species[Count + 1] <- as.character(iris$Species[i])
Count = Count + 1
}
}
length(Species)
30-04-20, 2:27 p.m. chrl3hr5@gmail.com


Log-in to answer to this question.