In the program file I am using, I would like to have a translation of the variables in the program to the explanation of what the variables mean. I have the list of variables and their corresponding definitions. I also have the formulas, sample provided. The output I would like would be the translation of the variable in the formulas (provided in the example) to the explanations of what the variables represent. My example is simplistic, but I typically have about 100 variables and 100 formulas.
I tried to find similar questions but could not find the answer.
structure(list(variable = c("cs", "csp", "cb", "cc", "ccel",
"ccrt"), definition = c("cost of salad", "cost of soup", "cost of bread",
"cost of chicken", "cost of celery", "cost of carrot"), formula = c("cs=cb+ccel+cc",
"csp=cc+ccel+crt", NA, NA, NA, NA), Translation = c("cost of salad=cost of bread+cost of celery+cost of chicken",
"cost of soup=cost of chicken+cost of celery+cost of carrot",
NA, NA, NA, NA)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-6L))
dput()
on your data frame and copy-paste the output to your post. This will make it more accessible.