0

My question is a basic one concerning object type manipulation.

hello = 3
name = 'hello'

I'm looking for a function that allows me to find the value 3 by using only the object name.

Something like:

print.the.thing.called(name)
[1] 3

Thanks a lot !

Jose Luis
  • 3,307
  • 3
  • 36
  • 53
Remi.b
  • 17,389
  • 28
  • 87
  • 168

1 Answers1

1

Use get to get an object by its name :

R> x <- 2
R> get("x")
[1] 2   
juba
  • 47,631
  • 14
  • 113
  • 118