I have a dataframe named "exposure" in long format. It has a CRP protein variable named "CRP" and 100 metabolites named as 1_T1, 2_T1, 3_T1, 4_T1 etc.
When I tried to do a simple linear regression with lm:
lm(1_T1 ~ CRP, data = exposure)
r returned Error: unexpected input in "lm(1_"
When I changed the metabolite names in the dataframe starting from alphabet such as m1_T1, m2_T2 etc, it works.
My question is: Is there a way calling variables named with number that will be treated correctly in the model formula in R, without resolving by changing the variable names?
I tried to use "1_T1"
but it didn't work.
Thanks!
Jake