Shapiro.test => error and I don't find my mistake


I have these data

It's in French but to summarize a little, I have two groups, the 1st one: n=30 ("most manipulated mice") and the 2nd one: n=20 ("less manipulated mice). And the "temps de..." column is just a measured time.

plus<-subset (compo, Individus=="Plus manipulées")
moins<-subset (compo, Individus=="Peu Manipulées")
shapiro.test (plus$Temps de descente)
shapiro.test (moins$Temps de descente)

I thought it would have the results I was looking for but for shapiro.test, the "is.numeric(X) is not TRUE" appears and despite my researches on internet, I didn't manage to understand where there is a mistake.

I know I'm pretty bad when it comes to using R Studio (I'm a beginner) but if someone could help me understand I would be veryyy happy!

Have a good day!

Run the summary function on your data frame


I suspect your Temps are characters because the usual French decimal symbol is "," and your numbers use ".". When I run summary() on a data frame with two columns named age and class_attendance I get this

      age        class_attendance  
 Min.   :6.000   Length:18         
 1st Qu.:6.000   Class :character  
 Median :7.000   Mode  :character  
 Mean   :6.944                     
 3rd Qu.:8.000                     
 Max.   :8.000    

The numeric column is summarized with statistics and the character column has its Class listed as character.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.