tweetbotornot icon indicating copy to clipboard operation
tweetbotornot copied to clipboard

Error: `by` can't contain join column `user_id` which is missing from LHS

Open woj-ciech opened this issue 6 years ago • 14 comments

Hey,

I've installed every dependency but still I'm facing issue, please check below:

users <- c("realDonaldTrump") data <- botornot(users) ↪ Counting features in text... ↪ Sentiment analysis... ↪ Parts of speech... ✔ Job's done! ↪ Counting features in text... ↪ Sentiment analysis... ↪ Parts of speech... ✔ Job's done! Error: 'by' can't contain join column 'user_id' which is missing from LHS Call rlang::last_error() to see a backtrace > rlang::last_error() message: 'by' can't contain join column 'user_id' which is missing from LHS class: rlang_error backtrace: tweetbotornot::botornot(users) tweetbotornot:::botornot.character(users) tweetbotornot:::botornot.data.frame(x, fast = fast) tweetbotornot:::extract_features_ytweets(x) dplyr:::left_join.data.frame(dd1, dd2, by = "user_id") dplyr:::left_join.tbl_df(...) dplyr:::common_by.character(by, x, y) dplyr:::common_by.list(by, x, y) dplyr:::bad_args(...) dplyr:::glubort(fmt_args(args), ..., .envir = .envir) Call rlang::last_trace() to see the full backtrace

Thanks in advance

woj-ciech avatar Jan 23 '19 08:01 woj-ciech

@mkearney maybe is problem in this line: dplyr:::left_join.data.frame(dd1, dd2, by = "user_id")

Does error mean that user_id cant joins together with results? The problem can be in parameter by =

source: https://github.com/r-spatial/sf/issues/412

Hawkeye407 avatar Feb 15 '19 17:02 Hawkeye407

I'm getting this problem too, and it looks like it is caused by a change in the textfeatures package which dropped user_id from the output.

https://github.com/mkearney/textfeatures/commit/ad68f04d93f0cca90d59445dcc4dcc6d3b05c125#diff-6b7e46e503afb26a0d984b4217f355ac

A workaround is to install the older version of textfeatures:

devtools::install_version('textfeatures', version='0.2.0', repos='http://cran.us.r-project.org')

riddlet avatar Mar 04 '19 21:03 riddlet

I'm getting this problem too, and it looks like it is caused by a change in the textfeatures package which dropped user_id from the output.

mkearney/textfeatures@ad68f04#diff-6b7e46e503afb26a0d984b4217f355ac

A workaround is to install the older version of textfeatures:

devtools::install_version('textfeatures', version='0.2.0', repos='http://cran.us.r-project.org')

I tried this code but still not working, same error code, do you know the reason why,

WeiyuW avatar Apr 28 '19 03:04 WeiyuW

I am also having this problem. Did anyone manage to solve this? I also installed the older version of textfeatures and nothing

victorgois avatar May 13 '19 00:05 victorgois

I'm having the exact same problem. I installed textfeatures as well and haven't had any luck. Anyone know what's going on?

jimeneztyler avatar May 14 '19 18:05 jimeneztyler

I just solved the problem, reinstalling the tweetbotornot via GitHub (I installed via CRAN in the first time). In this proccess, I had an issue with the compile of the package 'slam'. This I solved by downloading the gfortran compile for MacOS. If you use windows, you may have this problem too. After instaliing gfortran, I was able to compile the 'slam' and reinstalled the API and everything worked.

Another modification that I did was to use the function lookup_users from rtweet package. `

load package

library(tweetbotornot) library(rtweet)

select users

users <- c("victorgoisp")

get botornot estimates

data <- botornot(lookup_users(users))`

victorgois avatar May 14 '19 18:05 victorgois

The error remains to be unresolved for me even after installing gfortran and comliling slam.

kuyaKS avatar Jun 03 '19 05:06 kuyaKS

I'm getting this problem too, and it looks like it is caused by a change in the textfeatures package which dropped user_id from the output. mkearney/textfeatures@ad68f04#diff-6b7e46e503afb26a0d984b4217f355ac A workaround is to install the older version of textfeatures:

devtools::install_version('textfeatures', version='0.2.0', repos='http://cran.us.r-project.org')

I tried this code but still not working, same error code, do you know the reason why,

My problem was solved by installing textfeatures version 0.2.0 , download it from old source archives (https://cran.r-project.org/src/contrib/Archive/textfeatures/textfeatures_0.2.0.tar.gz) , then import it from your own local

WeiyuW avatar Jun 03 '19 13:06 WeiyuW

I've tried everything in this thread, anyone still having this issue?

jimeneztyler avatar Jun 12 '19 17:06 jimeneztyler

I'm getting this problem too, and it looks like it is caused by a change in the textfeatures package which dropped user_id from the output.

mkearney/textfeatures@ad68f04#diff-6b7e46e503afb26a0d984b4217f355ac

A workaround is to install the older version of textfeatures:

devtools::install_version('textfeatures', version='0.2.0', repos='http://cran.us.r-project.org')

It worked for me. Thanks.

atish-ajgekar avatar Jul 12 '19 14:07 atish-ajgekar

I'm getting this problem too, and it looks like it is caused by a change in the textfeatures package which dropped user_id from the output.

mkearney/textfeatures@ad68f04#diff-6b7e46e503afb26a0d984b4217f355ac

A workaround is to install the older version of textfeatures:

devtools::install_version('textfeatures', version='0.2.0', repos='http://cran.us.r-project.org')

worked for me! thanks! The ones who think this does not help, restart R before running the sample code again.

arasselvi avatar Jul 31 '19 07:07 arasselvi

I seem to find one source of the problem. It happens when the value you trying to join whit is the factor of different levels in each data frame, transforming both to character type solves the problem.

skuam avatar Jan 11 '20 23:01 skuam

In my situation, my problem was solved by changing code little bit. Like this:

Previous one: test <- dplyr:::left_join.data.frame(w1, holiday, merge, by = c(“w1$date” = ‘holiday$date’))

Fixed one: test <- dplyr:::left_join.data.frame(w1, holiday, merge, by = ‘date’)

HiroshigeAoki avatar Jan 23 '20 16:01 HiroshigeAoki

In my situation, my problem was solved by changing code little bit. Like this:

Previous one: test <- dplyr:::left_join.data.frame(w1, holiday, merge, by = c(“w1$date” = ‘holiday$date’))

Fixed one: test <- dplyr:::left_join.data.frame(w1, holiday, merge, by = ‘date’)

HiroshigeAoki avatar Jan 23 '20 16:01 HiroshigeAoki