Create an Object of mode call in R Programming - call() Function Last Updated : 19 Jun, 2020 Comments Improve Suggest changes Like Article Like Report call() function in R Language is used to create or test for objects of mode "call". Syntax: call(name, ...) Parameters: name: a non-empty character string naming the function to be called ...: arguments to be part of the call Example 1: Python3 # R program to illustrate # call function # Calling call() function x <- call("sin", 23) y <- call("cos", 0) x y # Evaluating values of call eval(x) eval(y) Output: sin(23) cos(0) [1] -0.8462204 [1] 1 Example 2: Python3 # R program to illustrate # call function # Calling call() function x <- call("round", 10.5) x # Initializing a round character f <- "round" # Calling call() function call(f, quote(A)) Output: round(10.5) round(A) Example 3: Python3 # R program to illustrate # call function # Initializing round value # without its character f <- round # Calling call() function # which will give an error # bcs the argument should be # a character string call(f, quote(A)) Output: Error in call(f, quote(A)) : first argument must be a character string Execution halted Comment More infoAdvertise with us Next Article Create an Object of mode call in R Programming - call() Function K Kanchan_Ray Follow Improve Article Tags : R Language R Functions R Object-Function Similar Reads Coercing an Object of mode "list" to mode "call" in R Programming - as.call() Function as.call() function in R Language is used to coerce the object of mode "list" to mode "call". The first element of the list becomes the function part of the call. Syntax: as.call(x) Parameters: x: an arbitrary R object Example 1: Python3 # R program to illustrate # as.call function # Calling the as.c 1 min read Check if an Object is a Call in R Programming - is.call() Function is.call() function in R Language is used to determine whether x is a call or not. Syntax: is.call(x) Parameters: x: an arbitrary R object Example 1: Python3 # R program to illustrate # is.call function # Calling is.call() function is.call(call) Output: [1] FALSE Example 2: Python3 # R program to ill 1 min read Convert a Numeric Object to Character in R Programming - as.character() Function as.character() function in R Language is used to convert a numeric object to character object. Syntax: as.character(x) Parameters: x: Numeric Object Example 1: Python3 1== # R program to convert a numeric object # to character object # Calling as.character() function as.character(1) as.character(2 + 1 min read Convert an Object to List in R Programming - as.list() Function as.list() function in R Programming Language is used to convert an object to a list. These objects can be Vectors, Matrices, Factors, and dataframes. Syntax: as.list(object) Parameters: object: Vector, Matrix, factor, or data frame R - as.list() Function ExampleExample 1: Converting Vector to list 2 min read Get or Set the Type of an Object in R Programming - mode() Function mode() function in R Language is used to get or set the type or storage mode of an object. Syntax: mode(x) mode(x) <- value Here "value" is the desired mode or âstorage modeâ (type) of the object Parameters: x: R object Example 1: Python3 # R program to illustrate # mode function # Init 1 min read Convert an Object into a Vector in R Programming - as.vector() Function as.vector() function in R Language is used to convert an object into a vector. Syntax: as.vector(x) Parameters: x: Object to be converted Example 1: Python3 1== # R program to convert an object to vector # Creating an array x <- array(c(2, 3, 4, 7, 2, 5), c(3, 2)) x # Calling as.vector() Function 1 min read Applying a Function over an Object in R Programming - sapply() Function sapply() function in R Language takes list, vector or data frame as input and gives output in vector or matrix. It is useful for operations on list objects and returns a list object of same length of original set. Syntax: sapply(X, FUN) Parameters: X: A vector or an object FUN: Function applied to e 1 min read Convert an Object to Data Frame in R Programming - as.data.frame() Function as.data.frame() function in R Programming Language is used to convert an object to data frame. These objects can be Vectors, Lists, Matrices, and Factors. Syntax: as.data.frame(object) Parameters: object: Vector, Matrix, factor, or data frameR - as.data.frame() Function ExampleExample 1: Basic exam 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 Convert a Character Object to Integer in R Programming - as.integer() Function as.integer() function in R Language is used to convert a character object to integer object. Syntax: as.integer(x) Parameters: x: Character Object Example 1: Python3 1== # R program to convert a character object # to an integer object # Calling as.integer() function as.integer("4") as.inte 1 min read Like