I have a slightly complex analysis, I would appreciate it if someone could help me figure out how to write it in R and in what package.
The variables: