Re: [R] replace character by numeric value

2023-09-27 Thread Ivan Calandra
Dear Arnaud, I don't quite unterstand why you have imbricated ifelse() statements. Do you have more that BUY (1) and SELL (-1)? If not, why not simply: mynewdf2 <- mydf2 |> dplyr::mutate(side = ifelse(side == 'BUY', 1, -1)) That would solve the problem. I'm not quite sure exactly what happens,

[R] replace character by numeric value

2023-09-27 Thread arnaud gaboury
I have two data.frames: mydf1 <- structure(list(symbol = "ETHUSDT", cummulative_quote_qty = 1999.9122, side = "BUY", time = structure(1695656875.805, tzone = "", class = c("POSIXct", "POSIXt"))), row.names = c(NA, -1L), class = c("data.table", "data.frame")) mydf2 <- structure(list(symbol = c("ET

Re: [R] identify the distribution of the data

2023-09-27 Thread Bogdan Tanasa
Dear all, Thank you for your insights, suggestions and for sharing your knowledge. I have found the package fitdistrplus to meet our needs. Warm regards, Bogdan On Wed, Feb 8, 2023 at 11:10 PM PIKAL Petr wrote: > Hi > > Others gave you more fundamental answers. To check the possible > distrib