cs1b chap 7 point estimation , example 7.1

Discussion in 'CS1' started by SURESH SHARMA, Aug 23, 2020.

  1. SURESH SHARMA

    SURESH SHARMA Member

    Dear Sir ,
    i have uploaded the children naruto by using the children<- read.csv(file.choose( )) , now as a tried to do the histogram by typing the function
    hist(children), i am getting error as Error in hist.default(children) : 'x' must be numeric. as per the study material below mentioned function is used
    str(Children)
    c <-Children$V1
    str(c)

    hist(c, breaks=c(-0.5:7.5),ylim=c(0,30),xlim=c(0,10),xlab="number of children",
    main="Children in 80 families")
    but i am getting error as

    Error in hist.default(c, breaks = c(-0.5:7.5), ylim = c(0, 30), xlim = c(0, :
    'x' must be numeric
    please guide , as how should i resolve it .
     
  2. John Lee

    John Lee ActEd Tutor Staff Member

    You stored it in children but then did c <-Children$V1
    And R is case sensitive.
     

Share This Page