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 <a...@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: a...@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.christodoul...@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@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]] ______________________________________________ R-help@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.