Hello ,
I have a dataframe with two columns, query and rang_min_reponse.
What we mean by rang_min_reponse is the minimum rank of the answer clicked for example if we click on answer 5 and 2 rang_min_reponse will take 2.
I need to study the modes of the variable rang_min_reponse by queries - and that I identify the 3 queries with the most modalities.
Here's the code, can you help me improve it?
Excuse me for misspellings
the code :
Scriot en R :
#installer des packages
library(readr)
library(dplyr)
#charger des données
data <-read_table2(file = "data",header = TRUE, sep = "," , quote = """, dec = ".")
data
data %>% View()
#Extraire les données
data[,17]
data[,62]
data <- data[c(17,62)]
data %>% View()
#filtrer les données ayant un rang min>3
data <- filter(data, rang_min_reponse > 3)
data %>% View()
#regrouper les données par requete et determiner le mode
data<- data %>% group_by(requete) %>% summarise(rang_min_reponse = max(rang_min_reponse ,na.rm =FALSE ) %>%
data %>% View()
library(modeest)
install.packages("modeest")
mySamples <- data[,1]
mlv(mySamples, method = "mfv")