Hi!, I'm looking help for this question.
I have the following matrix.
t n
0 10000
10 8812
20 7763
30 6841
40 5998
50 5309
60 4669
70 4138
80 3656
90 3235
100 2870
¿How can I apply the following equation?
Please, help!
Hi!, I'm looking help for this question.
I have the following matrix.
t n
0 10000
10 8812
20 7763
30 6841
40 5998
50 5309
60 4669
70 4138
80 3656
90 3235
100 2870
¿How can I apply the following equation?
Please, help!
Are the data in a matrix or data frame? If in a data.frame:
library(dplyr)
df <- df %>%
mutate(x = (n - lead(n))/((lead(t) - t) * n))
If it's a matrix put as.data.frame
before mutate
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.