R Program to Take Input From User And Display the values

R program to take input from the user and display the values: When we are working with R in an interactive session, we can use the redline() function to take input from the user (terminal).This function will return a single element character vector.

R Program to Take Input From User

Source Code

N1 = readline(prompt="Input your name: ")
A1 =  readline(prompt="Input your age: ")
print(paste("My name is",N1, "and I am",A1 ,"years old."))
print(R.version.string)

Output