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

Veröffentlicht am: 07 September 2021
auf dem Kanal: 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  


Auf dieser Seite können Sie das Online-Video Set Row & Column Names of Data Frame with Unknown Dimension in R (Example) | nrow, paste0 & ncol mit der Dauer online in guter Qualität ansehen, das der Benutzer Statistics Globe 07 September 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 771 Mal angesehen und es wurde von 13 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!