0

I'm a R noob and am sorry to have to ask this question. I have a dataset loaded into R. There's a column named "Score".

I've made a variable named score.

score = as.integer(mydata$score)

There are values between 1 and 100 in that column. When I ask R

range(score)

I get 1 50. Similarly, when I use:

max(score)

I get 50... What have I done wrong?

porteclefs
  • 477
  • 2
  • 6
  • 12
  • 1
    please use `dput` to produce a [reproducible test](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – sds Mar 03 '14 at 19:19
  • 4
    Almost certainly you are applying `as.integer` onto a factor column. Try `as.integer(as.character(mydata$score))` to see if that fixes it. That said, I wouldn't bet much on this unless you `dput` your data as @sds suggests. – BrodieG Mar 03 '14 at 19:23

0 Answers0