Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R has to be restarted in roder to get right values #36

Open
froever opened this issue Oct 10, 2023 · 0 comments
Open

R has to be restarted in roder to get right values #36

froever opened this issue Oct 10, 2023 · 0 comments

Comments

@froever
Copy link

froever commented Oct 10, 2023

Hallo Community,

I have a strange behavior in R according to Coinmarketcapr. In a script, I download crypto values from Coinmarketcap web server with the r package Coinmarketcapr.
Later I want to do some matching with coloums of the dataframes aa and historiedf2. But the strange thing is, I get only correct values, when I close R and run those four lines again.
`
library(coinmarketcapr)

setup(api_key = "", sandbox = FALSE)
a <- get_crypto_listings('EUR', latest=T, start=4900, limit=100, sort="market_cap", sort_dir="desc")
aa <- a[ ,c(2,3,22)]
historieDF2 <- get_crypto_listings('EUR', limit=5000, sort="market_cap", sort_dir="desc")
historieDF2 <- historieDF2[ ,c(2,3,22)]

liste_aa_df_1_na <- match(aa[,1] , historieDF2[,1])
liste_aa_df_2_na <- match(aa[,2] , historieDF2[,2])
liste_df_aa_1_na <- match(historieDF2[,1] , aa[,1])
liste_df_aa_2_na <- match(historieDF2[,2] , aa[,2])
`

When I run these lines muliple times before closing, I get no matchings at all.
But when I restart RStudio and run these four lines again, I get correct matchings and values.
Nothings else is being done.

This behavior exists only with data from coinmarketcapr. When I try other kind of data, the matching function is working.

@froever froever changed the title R has to be restart in roder to get right values R has to be restarted in roder to get right values Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant