Hi Jim,
Thank you very much, this was so helpful.
GPP_Ahmed13$Date <- as.Date(GPP_Ahmed13$Date, '%Y/%m/%d')
Litterfall_Ahmed97$Date <- as.Date(Litterfall_Ahmed97$Date, '%Y/%m/%d')
leafbiom97$Date <- as.Date( leafbiom97$Date, '%Y/%m/%d')
(leafbiom97$LeafBiog[leafbiom97$Date == "2012-02-12"] -
> On Jun 21, 2017, at 11:19 AM, Ahmed Attia wrote:
>
> Hi R users,
>
> I need your help to write a code in r that does the following
> calculation from three different datasets;
>
> ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2
> -biomass at
Hi Ahmed,
Your problem appears trivial as you have already specified the form of
the calculation.
Learn how to "extract" specified elements from a data structure:
# first value
sum(dataset1$NPP[dataset1$date >= date1 &
dataset1$date <= date2])
# second value
dataset2$biomass[dataset2$date ==
We expect posters to have made an effort to learn R and show us code
that they have tried. We do not provide free software development. The
"Introduction to R" tutorial that ships with the software is one place
to start, but there are many good web tutorials also available. Just
search.
Cheers,
Hi R users,
I need your help to write a code in r that does the following
calculation from three different datasets;
ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2
-biomass at date 1, dataset = 2) + (littfall at date 2, dataset=3).
all the dates are in yr-month-day
5 matches
Mail list logo