Hello, new here.
I am trying to gather data from multiple dataframe.
My dataframe called "a3" is empty, and wants to copy every variable listed from the "a2" dataframe.
Next, I want to create a new variable called "fruits" in "a3" , which is the sum of 3 variables called apple, orange, and mango, into a variable called "fruits" based on dataframe "a".
The problem is that when I do this, it takes every variable listed in dataframe "a" and overrides the variables copied from "a2".
The only thing I wanted was dataframe from "a2" and the new variable based off of "a"
How should I approach this/what am I doing wrong? My attempt is below.
Hi @Affinity , remember put a reproducible example of data, is a better way for help you all the community.
You could make something like that: dput(a3[1:20,]) # select the firts 20 rows and all the column