20180221 RStudio Histogram and Boxplot Tutorial

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 12

  • @dilkumarbantawarai736
    @dilkumarbantawarai736 3 года назад +1

    I'm getting the error x must be a numeric, can u provide me alternative way?

    • @DavidTabb
      @DavidTabb  3 года назад

      My best guess is that R read the first line of the text file as data rather than a header value. The vector of ("Heights", 186, 190, 180, 179) is not numeric, but a vector named "Heights" that contains (186, 190, 180, 179( is numeric. I am sorry that I encountered your question so long after you entered it!

  • @jinsvj2387
    @jinsvj2387 4 года назад

    Thank you so much, really helpful. I have one doubt: Can you tell me what is a natural break in a histogram? I found in one research paper that the natural break in histogram of all values was used for deciding some cut-off value. How its is done?

    • @DavidTabb
      @DavidTabb  4 года назад

      A "natural break" means using the data to decide where the bin boundaries are. In my histograms, I generally ask the highest value and the lowest, then how many data points in total I have (so that we don't use bins that are much too narrow and are thus unpopulated). A natural break approach will ask where the points lie within the range to determine where to set the bin bounds. I haven't generally used that approach.

  • @deepu7529
    @deepu7529 3 года назад +1

    what to do for a csv file? is it the same way sir ?

    • @DavidTabb
      @DavidTabb  3 года назад +1

      A CSV is also a text file, but it uses a delimiter of a comma rather than a tab. In your call to read.table, specify sep = ","

    • @deepu7529
      @deepu7529 3 года назад +1

      @@DavidTabb thank you sir

  • @statisticstime4734
    @statisticstime4734 4 года назад +1

    Excellent!

  • @sagarhm1731
    @sagarhm1731 4 года назад

    I'm getting the error x must be a numeric, can u please help me

    • @DavidTabb
      @DavidTabb  4 года назад

      Hi, Sagar. If the hist() function returns that error, it means that the variable you are trying to plot hasn't been set properly (for example, the file didn't read into memory). Try this combo: a

  • @komfykoala6083
    @komfykoala6083 3 года назад +1

    Thanks so much for this!

  • @aidanquigley3351
    @aidanquigley3351 5 лет назад

    Really useful thank you