Load the datasets package

library("gtsummary")

install.packages(“gtsummary”)

library(gtsummary)
datasets::beaver2
str(beaver2)
## 'data.frame':    100 obs. of  4 variables:
##  $ day  : num  307 307 307 307 307 307 307 307 307 307 ...
##  $ time : num  930 940 950 1000 1010 1020 1030 1040 1050 1100 ...
##  $ temp : num  36.6 36.7 36.9 37.1 37.2 ...
##  $ activ: num  0 0 0 0 0 0 0 0 0 0 ...

View the structure of beaver2 dataset

str(beaver2)
## 'data.frame':    100 obs. of  4 variables:
##  $ day  : num  307 307 307 307 307 307 307 307 307 307 ...
##  $ time : num  930 940 950 1000 1010 1020 1030 1040 1050 1100 ...
##  $ temp : num  36.6 36.7 36.9 37.1 37.2 ...
##  $ activ: num  0 0 0 0 0 0 0 0 0 0 ...
# Create a cross table (contingency table)
# For example, cross tabulate 'day' and 'activity'
# Display the cross table
plot(cars)

#Interpretation The graph for’dataset_bearver2’ illustrates the relationship between ‘speed’ and ‘dist’. From the graph, we observe that as the speed increases, the distance (‘dist’) also tends to increase. The data points show a positive correlation, indicating that higher speeds are generally associated with longer stopping distances. The spread of points suggests variability, but the overall trend is upward, implying that speed is a significant factor influencing the distance in this dataset.