#funcao <- function(x,y){ # return(c(x*2+y)) #} #print(funcao(5,7)) #a <- c(1,2,3,4,5,"gjhgjh") #b <- c(1,2,3,4,6,5) #( i , j ,k)+( x,y ,z)+(1,1,1) = (i+x+1 , j^y,k+z) #print(a/b) #nchar #print(length(a)) #x <- c("kiwi", "ma��", "uva", "pera", "banana") #print(x) #print(x[1]) #print(x[2:4]) #print(length(x)) #print(typeof(x)) #print(x[7]) #print(paste0("Vou comprar ", x[1])) #i <- 3 #print(x[i]) #print(paste(x[i-1], x[i], x[i+1] )) #print(x[(i-1):(i+1)],quote=F) #xy <- 54 #ab <- c( 1 , 2 , 3 , 4 , xy , 124 , "arroz",12,123,12,412,4,1254,23,531,51,35,356,34,6,34,6,347,235,3457,54,7,45,7,'fim') # [1],[2],[3],[4],[5],[6],[7] #print(ab[length(ab)]) #max <- b[1] #for ( i in b){ # if (max <= i){ # max <- i # } #} #print(max) #maioDoVetorWhile2 <- function(vet){ # max <- -Inf # i <- 1 ## while(i <= length(vet)){ # if(vet[i] > max){ # max <- vet[i] # } # i <- i + 1 #} #return(max) #} #print(Inf-Inf) planilha8 <- read.csv("alunos.csv") n <- nrow(planilha8) i <- 1 temmaior<- T valor<-0 while(temmaior && i<=n){ i<-i+1 if(planilha8[i,2]>=190){ temmaior <- F valor<- planilha8[i,] } } if(temmaior){ print("não tem maior") }else{ print("tem maior") print(valor)}