Round All Values in Matrix in R (2 Examples) | Rounding Each Element | To Zero Digits & to N Digits
Автор: Statistics Globe
Загружено: 2022-11-23
Просмотров: 305
Описание:
How to round all values in a matrix object in the R programming language. More details: https://statisticsglobe.com/round-all...
R code of this video:
set.seed(354238654) # Set seed
mat <- matrix(rnorm(30), ncol = 5) # Create random example matrix
mat # Print random example matrix
mat_round1 <- round(mat) # Round to zero digits
mat_round1 # Print rounded matrix
mat_round2 <- round(mat, digits = 2) # Round to two digits
mat_round2 # Print rounded matrix
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – R Programming Group for Discussions & Questions: / statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – R Programming Group for Discussions & Questions: / 12555223
LinkedIn – Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: