[R] [EXT] How to calculate the derivatives at each data point?

konstantinos christodoulou kon@t@nt|no@@chr|@todou|ou1 @end|ng |rom gm@||@com
Tue Jan 31 12:40:40 CET 2023


Hi Andrew,

I applied your command in another dataset with known derivative values and
it gave me very satisfactory results!
Therefore, I will use it on my dataset. Thank you so much!

Kostas



On Tue, Jan 31, 2023 at 12:22 PM Andrew Robinson <apro using unimelb.edu.au>
wrote:

> 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