Brilliant!
Thanks
Martin
Quoting Henrique Dallazuanna :
Try this:
sapply(intvl.period.myrs, sum)
On Tue, May 17, 2011 at 1:13 PM, Martin Hughes wrote:
Dear R users
I have a list, as follows:
intvl.period.myrs
$Devonian
[1] 4.8 4.2 9.5 5.7
$Ordovician
[1] 7.2 5.1 10.2 1.9
$Silu
Try this:
sapply(intvl.period.myrs, sum)
On Tue, May 17, 2011 at 1:13 PM, Martin Hughes wrote:
>
>
> Dear R users
>
> I have a list, as follows:
>
>> intvl.period.myrs
>
> $Devonian
> [1] 4.8 4.2 9.5 5.7
>
> $Ordovician
> [1] 7.2 5.1 10.2 1.9
>
> $Silurian
> [1] 4.7 3.0 7.8 2.0 3.3 1.6 2.6 2.
Dear R users
I have a list, as follows:
intvl.period.myrs
$Devonian
[1] 4.8 4.2 9.5 5.7
$Ordovician
[1] 7.2 5.1 10.2 1.9
$Silurian
[1] 4.7 3.0 7.8 2.0 3.3 1.6 2.6 2.7
I want to write a loop that will sum up the values in each part, and give me a
vector containing the (in this case 3)
3 matches
Mail list logo