VOOZH about

URL: https://www.geeksforgeeks.org/r-language/convert-a-character-object-to-integer-in-r-programming-as-integer-function/

⇱ Convert a Character Object to Integer in R Programming - as.integer() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Convert a Character Object to Integer in R Programming - as.integer() Function

Last Updated : 15 Jul, 2025
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: Output:
[1] 4
[1] 1
[1] -3
[1] 1024
Example 2: Output:
[1] FALSE
[1] 1 2 3 4 5
[1] TRUE
Comment

Explore