Set Row & Column Names of Data Frame with Unknown Dimension in R (Example) | nrow, paste0 & ncol

Опубликовано: 07 Сентябрь 2021
на канале: Statistics Globe
771
13

How to change row and column names of a data frame or matrix without knowing the dimensions in the R programming language. More details: https://statisticsglobe.com/set-row-a...
R code of this video:

data <- matrix(1:20, ncol = 5) # Create example matrix
data # Print example matrix

rownames(data) <- 1:nrow(data) # Set row names
data # Print updated data

colnames(data) <- paste0("Col", 1:ncol(data)) # Set column names
data # Print updated data

Follow me on Social Media:
Facebook:   / statisticsglobecom  
LinkedIn:   / statisticsglobe  
Twitter:   / joachimschork  


На этой странице сайта вы можете посмотреть видео онлайн Set Row & Column Names of Data Frame with Unknown Dimension in R (Example) | nrow, paste0 & ncol длительностью online в хорошем качестве, которое загрузил пользователь Statistics Globe 07 Сентябрь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 771 раз и оно понравилось 13 зрителям. Приятного просмотра!