Impossible Values/Messy Data

I am trying to bring two datasets together.
blinks_full <-
setuplong %>%
sub = as.numeric(gsub("subject_","",sub)),
trial_number = as.numeric(gsub("trial_","",trial_number))
) %>%
rename(trial_no = trial_number) %>%
full_join(x = ., y = eyedata)

I keep getting this:
Error: by must be supplied when x and y have no common variables.
i use by = character()` to perform a cross-join.

I'm not sure how to fix this.

Error: by must be supplied when x and y have no common variables.

That is the issue.

Can you provide a reproducible example?

full_join() will look at the names of the variables in x and y to see where they overlap. It will then, by default, try to merge based on the overlapping variables.

data_1 <- tibble(x=1:3,y=2:4,z=3:5)
data_2 <- tibble(x=1:4,w=5:8)

The above will try to join on x since that is the only variable that bot datasets have in common. Have a look at what variables are in eyedata. Based on this error, I'd say that none of them match the dataset being piped into full_join()(i.e. the one passed through mutate() and rename()).

This topic was automatically closed 21 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.