Creating a new variable using the base R pipe
I am trying to create a new variable in an R dataframe using the Base R pipe and within(). If I specify the new variable’s name directly, it works just fine. But if the new variable’s name is the value of another variable, my code doesn’t work
Minimal example:
Creating a new variable using the base R pipe
I am trying to create a new variable in an R dataframe using the Base R pipe and within(). If I specify the new variable’s name directly, it works just fine. But if the new variable’s name is the value of another variable, my code doesn’t work
Minimal example:
Creating a new variable using the base R pipe
I am trying to create a new variable in an R dataframe using the Base R pipe and within(). If I specify the new variable’s name directly, it works just fine. But if the new variable’s name is the value of another variable, my code doesn’t work
Minimal example:
Creating a new variable using the base R pipe
I am trying to create a new variable in an R dataframe using the Base R pipe and within(). If I specify the new variable’s name directly, it works just fine. But if the new variable’s name is the value of another variable, my code doesn’t work
Minimal example: