Skip to content
Prev 15194 / 15274 Next

apply a function to a data.frame column with condition

On Fri, 2025-03-07 at 08:55 +0100, Enrico Schumann wrote:
Yes, in this cas I only fecth BTCUSD price, thus my get_btc_price().
For generic, I created get_price().

Your function gives me exactly what I wanted.

Question: why do you paste 42 here ?
    get_btc_price <- function(my_time) {
        paste(42, my_time)
    }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20250307/ff8354f9/attachment.sig>