[R] [EXT] How to calculate the derivatives at each data point?
Andrew Robinson
@pro @end|ng |rom un|me|b@edu@@u
Tue Jan 31 11:21:56 CET 2023
Try something like
with(df, predict(smooth.spline(x = altitude, y = atm_values), deriv = 1))
Cheers,
Andrew
--
Andrew Robinson
Chief Executive Officer, CEBRA and Professor of Biosecurity,
School/s of BioSciences and Mathematics & Statistics
University of Melbourne, VIC 3010 Australia
Tel: (+61) 0403 138 955
Email: apro using unimelb.edu.au
Website: https://researchers.ms.unimelb.edu.au/~apro@unimelb/
I acknowledge the Traditional Owners of the land I inhabit, and pay my respects to their Elders.
On 31 Jan 2023 at 8:17 PM +1100, konstantinos christodoulou <konstantinos.christodoulou1 using gmail.com>, wrote:
External email: Please exercise caution
Hi everyone,
I have a vector with atmospheric measurements (x-axis) that is
obtained/calculated at different altitudes (y-axis). The altitude is
uniformly distributed every 7 meters.
For example my dataframe is:
df <- dataframe(
*altitude* = c(1005, 1012, 1019, 1026, 1033, 1040, 1047, 1054, 1061, 1068),
*atm_values* = c(1.41, 1.40, 1.39, 1.38, 1.37, 1.37, 1.38, 1.36, 1.33, 1.31)
)
How can I find the derivatives of the atmospheric measurements at each
altitude?
I look forward to hearing from you!
Thanks,
Kostas
[[alternative HTML version deleted]]
______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help
mailing list