Remove names or dimnames from an Object in R Programming - unname() Function Last Updated : 16 Jun, 2020 Comments Improve Suggest changes Like Article Like Report unname() function in R Language is used to remove the names or dimnames from an Object. Syntax: unname(x) Parameters: x: Object Example 1: Python3 1== # R Program to remove names from an object # Creating a matrix A = matrix(c(1:9), 3, 3) # Naming rows rownames(A) = c("a", "b", "c") # Naming columns colnames(A) = c("c", "d", "e") print(A) # Removing names using unname() function unname(A) Output: c d e a 1 4 7 b 2 5 8 c 3 6 9 [, 1] [, 2] [, 3] [1, ] 1 4 7 [2, ] 2 5 8 [3, ] 3 6 9 Example 2: Python3 1== # R Program to remove names from an object # Calling pre-defined data set BOD # Removing names using unname() function unname(BOD) Output: Time demand 1 1 8.3 2 2 10.3 3 3 19.0 4 4 16.0 5 5 15.6 6 7 19.8 1 1 8.3 2 2 10.3 3 3 19.0 4 4 16.0 5 5 15.6 6 7 19.8 Comment More infoAdvertise with us Next Article Remove names or dimnames from an Object in R Programming - unname() Function N nidhi_biet Follow Improve Article Tags : R Language R Object-Function Similar Reads Remove Duplicate Elements from an Object in R Programming - unique() Function unique() function in R Language is used to remove duplicated elements/rows from a vector, data frame or array. Syntax: unique(x) Parameters: x: vector, data frame, array or NULL Example 1: Python3 # R program to illustrate # unique function # Initializing some set of numbers x <- c(1:10, 5:9) x # 1 min read Remove Objects from Memory in R Programming - rm() Function rm() function in R Language is used to delete objects from the memory. It can be used with ls() function to delete all objects. remove() function is also similar to rm() function. Syntax: rm(x) Parameters: x: Object name Example 1: Python3 1== # R Program to remove # objects from Memory # Creating a 2 min read Rename Columns of a Data Frame in R Programming - rename() Function The rename() function in R Programming Language is used to rename the column names of a data frame, based on the older names.Syntax: rename(x, names) Parameters:x: Data frame names: Old name and new name 1. Rename a Data Frame using rename function in RWe are using the plyr package to rename the col 2 min read Get or Set names of Elements of an Object in R Programming - names() Function names() function in R Language is used to get or set the name of an Object. This function takes object i.e. vector, matrix or data frame as argument along with the value that is to be assigned as name to the object. The length of the value vector passed must be exactly equal to the length of the obj 2 min read Display the internal Structure of an Object in R Programming - str() Function str() function in R Language is used for compactly displaying the internal structure of a R object. It can display even the internal structure of large lists which are nested. It provides one liner output for the basic R objects letting the user know about the object and its constituents. It can be 3 min read Removing Levels from a Factor in R Programming - droplevels() Function droplevels() function in R programming used to remove unused levels from a Factor. Syntax: # For vector object droplevels(x, exclude = if(anyNA(levels(x))) NULL else NA, ...) # For data frame object droplevels(x, except, exclude) Parameter values: x represents object from which unused level has to b 2 min read Naming Rows and Columns of a Matrix in R Programming - rownames() and colnames() Function rownames() function in R Language is used to set the names to rows of a matrix. Syntax: rownames(x) <- value Parameters: x: Matrix value: Vector of names to be set Example: Python3 1== # R program to provide a name # to rows of a Matrix # Creating a 3X3 Matrix A = matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 1 min read Get or Set Dimensions of a Matrix in R Programming - dim() Function The dim() function in R is used to get or set the dimensions of an object. This function is particularly useful when working with matrices, arrays, and data frames. Below, we will discuss how to use dim() to both retrieve and set dimensions, with examples for better understanding.Syntax: dim(x)Param 2 min read Convert an Object to a String in R Programming - toString() Function toString() function in R Language is used to convert an object into a single character string. Syntax: toString(x, width) Parameters: x: Object width: maximum string width Example 1: Python3 1== # R program to convert an object to string # Creating a vector x <- c("Geeks", "for 1 min read Search and Return an Object with the specified name in R Programming - get() Function get() function in R Language is used to return an object with the name specified as argument to the function. This is another method of printing values of the objects just like print function. This function can also be used to copy one object to another. Syntax: get(object) Parameters: object: Vecto 1 min read Like