Merging two datasets together

Dear all,
I am trying to merge items from 2 datasets in rstudio, but it's not working and i also don't get an error notification. I created 2 new data sets, which include the items and then tried to merge them into one...

data_AT<-select(ess10SC_austria, actrolga, accalaw)
Data_EVS<-select(EVS_data_2017_2021, v29)
by =c("actrolga", "accalaw", "v29"),
all = TRUE)
I really hope someone can help me finding the mistake I made - or maybe i forgot something..?
kind regards

usually joins rely on commonly shared unique identifier keys; do you have those ?

No, I don't have these. What exactly do you mean?

For each record in one set of your data by what principle should a record of data in the second be matched ?

Ah okay, I understand. I just wanted to combine the items in general into a new data set, they have no similliar principle to combine by. Does it not work like that or can I use another function?

The purpose of a dataframe is to contain related information together. I would generally consider it misleading to force non related information together and give the illusion that the information is related ( when it isnt).

Have you considered that ? Where would the value be in your combining these things ?

I wonder if we have a confusion of terms here. As nirgrahamuk says you need some common element on which to merge.

However if you have two dataframes, A & B, with the same number of rows and want to combine them into one dataframe you can simply do

C   <- cbind(A, B)

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.