I've tried using?cut but haven't been able to figure out how cut in R works. I'm attempting to grasp how cut divides and makes intervals.
Herein lies my issue:

set.seed(111)
data1 – seq (1, 10, by = 1)
data1 [1] 1 2 3 4 5 6 7 8 9 10
cut(data1, labels = FALSE, breaks = c(0,1,2,3,5,7,8,10)) data1cut
data1cut\s[1] 1 2 3 4 4 5 5 6 7 7
1. Why were 8,9, and 10 left out of the data1cut results?
2. Why do the results of summary(data1) and summary(data1cut) differ?

summary(data1)
Minimum, First Quarter, Median, Third Quarter, Maximum 1.00 3.25 5.50 5.50 7.75 10.00

summary(data1cut)
Minimum, First Quarter, Median, Third Quarter, Maximum 1.00 3.25 4.50 4.40 5.75 7.00
How can I utilise cut more effectively to make, say, 4 bins?
Jul 6, 2022 353 views

## How does cut with breaks work in R

I've tried using?cut but haven't been able ...READ MORE

## How to deal with NaN values in R?

Due of my inexperience with programming and ...READ MORE

## Introduction to Statistical Learning with Applications in R Figure Codes

I recently bought the following book: An Introduction ...READ MORE

## How to make loop for one-at-a time logistic regression in R?

You're probably looking for something similar to ...READ MORE

## What does c do in R?

The c function in R programming usually stands ...READ MORE

## Creating new Functions with Linear Regression in R :

When we want to create a model ...READ MORE

## Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE