0

I have a data set with weight values in a CSV file. My goal is to find the standard deviation of these values.

I have tried assigning a variable to the file, attaching it, then using the standard deviation function sd(), to find the standard deviation. In return, I get this error message:

Argument is not Numerical or Logical: returning NA

My file looks like this:

weight.g
54.4
24.2
84.9
56.5

This is the code that I'm using:

brains <- read.csv(file.choose())
attach(brains)
sd(brains)
OTStats
  • 1,820
  • 1
  • 13
  • 22
User9123
  • 675
  • 1
  • 8
  • 20
  • And what is the error message you got? – pogibas Jan 26 '19 at 18:24
  • the error message that is in the title: Error in is.data.frame(x) : (list) object cannot be coerced to type 'double' – User9123 Jan 26 '19 at 18:30
  • 1
    You are trying to put a data.frame in the `sd` function. Don't you mean `sd(brains$weight.g)`? or whatever the column name is in the brains data.frame? – phiver Jan 26 '19 at 18:31

0 Answers0