I need to apply a function to mydata1 variable. Her name, i.e. "mydata1", I create it manually and put it in the datai variable. How can I isolate the mydata1 variable (its value) if I know that its name "mydata1" is in the datai variable? That is, I know that datai contains the name of the variable I need, but the very name of this variable is "kind of" unknown to me.

Please clarify your specific problem or provide more detailed information on what exactly you need. As it stands, it is difficult to understand exactly what you are asking.

Дух сообщества2021-12-15 15:36:34

it is very likely that you want something a little different. for example, something like this: Is it possible to create multiple databases using a for loop?

aleksandr barakin2021-12-15 17:44:03
  • Answer # 1

    use the functionget () from the packagebase...


    mydata1 <
    datai <
    get (datai)
    # >
     [1] 42

    Created on 2021-12-15 by the reprex package(v1.0.0)