hist() का उपयोग
एक histogram numbers को ranges में group करता है और draw करता है कितने हर एक में आते हैं, height groups से blocks stack करने की तरह। यह आपके data का shape दिखाता है।
In this page:
Syntax
hist(x, breaks = number_of_bins, main = "title", xlab = "label")
hist()
hist(x) एक numeric vector की frequency distribution दिखाने वाला एक histogram draw करता है, automatically sensible bin widths चुनते हुए (या एक explicit breaks argument accept करते हुए)।
यह visually एक dataset की distribution shape inspect करने के सबसे fast तरीकों में से एक है। Histograms किसी भी numeric variable के लिए exploratory data analysis में पहला step हैं।
Note:
hist() को breaks = n pass करें यह control करने के लिए कि histogram लगभग कितने bins इस्तेमाल करे।
उदाहरण: hist()
set.seed(1)
values <- rnorm(100, mean = 50, sd = 10)
cat("Summary of values that hist() would visualize:\n")
print(summary(values))
cat("hist(values) would draw a histogram of this distribution\n")
Login to try C/C++/Java/PHP code in the editor
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- एक data frame या एक character vector pass करना, जो
x must be numericदेता है। - bars की संख्या को data की तरह पढ़ना, जब यह
breakssetting पर depend करता है और shape hide कर सकता है। hist()कोbarplot()से confuse करना, जब एक histogram एक numeric range को bins में group करता है।
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: