Hi Pablo,
Rui's suggestion is probably the best and easiest. In addition to
Eric's, i think the apply functions will work well here too.
Best of luck,
EK
On Thu, Dec 28, 2017 at 7:03 PM, PABLO ORTIZ PINEDA
wrote:
> Hello there. Happy new year for everyone!
>
> I need help with a table. This ta
Hello,
Just use ?aggregate.
Example <- read.table(text = "
ID ABCDEFG
a1 0001120
a2 0101221
a2 0112021
a3 0111111
", header = TRUE)
aggregate(. ~ ID, Example , sum)
Hi Pablo,
There are probably many ways to do this in R. This suggestion uses dplyr.
The solution is actually only one line (see the line starting with dat2).
The first section simply creates the example data.
library(dplyr)
# 1. set up the example data
m <- matrix( c(0,0,0,0,0,1,1,1,0,0,1,1,1,1,2,
Hello there. Happy new year for everyone!
I need help with a table. This table contains 300 rows and 192 columns.
Being the first column the ID of my samples that can have several
observations.
I need to generate e NEW table that contains a single ID with the sum of
the observations by columns
Hi Jim
2014-07-19 8:25 GMT-03:00 Jim Lemon :
>
> Hi Vero,
> I think this does what you want, even though it doesn't do it the way
> you describe above.
>
> cla<-runif(506)+
> rep(c(seq(1,3,length.out=23),seq(3,1,length.out=23)),11)
> obs_time<-paste(rep(1:11,each=46),rep(1:46,11),sep="_")
> t_ma
On Fri, 18 Jul 2014 10:15:35 AM Veronica Andreo wrote:
> Hi list
>
> I have a vector, which are remotely sensed chlorophyll values for a
certain
> pixel in 11 years, then i have a flag or label vector (t_max) that
consists
> of 0 and 1, which tells me where i have the annual peak (one per
year,
Hi list
I have a vector, which are remotely sensed chlorophyll values for a certain
pixel in 11 years, then i have a flag or label vector (t_max) that consists
of 0 and 1, which tells me where i have the annual peak (one per year, then
eleven 1 and all the rest are 0).
I'm interested in extractin
7 matches
Mail list logo