gistlib
# Create a matrix mat <- matrix(1:10, nrow = 2) # Insert a new row with custom values new_row <- c(11, 12, 13, 14, 15) mat <- rbind(mat, new_row) # Rename the row rownames(mat)[nrow(mat)] <- "custom_row_name" 211 chars10 lines
# Create a matrix mat <- matrix(1:10, nrow = 2) # Insert a new row with custom values new_row <- c(11, 12, 13, 14, 15) mat <- rbind(mat, new_row) # Rename the row rownames(mat)[nrow(mat)] <- "custom_row_name"
gistlibby LogSnag