Quantcast

"Simplifying" matrices ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"Simplifying" matrices ?

S. Nunes
Hi again,

the previous answers were great. I was able to do what was planned.
Now, I would like to do the following to a matrix:

|| year | event | team | total ||

where I can have multiple "event" per "team", but each "team" only has
a "year" and a "total". Thus, this table has multiple lines for the
same "team" where only the "event" changes.
Considering this, how can I output this:

|| year | team | total ||

where each "team" occurs only once, and the "event" was discarded.

Hope I made myself clear.
Thanks in advance.

This is a great mailing list.

Regards,
Sérgio Nunes

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Simplifying" matrices ?

Jacques VESLOT
unique(x[,-2])

Sérgio Nunes a écrit :

>Hi again,
>
>the previous answers were great. I was able to do what was planned.
>Now, I would like to do the following to a matrix:
>
>|| year | event | team | total ||
>
>where I can have multiple "event" per "team", but each "team" only has
>a "year" and a "total". Thus, this table has multiple lines for the
>same "team" where only the "event" changes.
>Considering this, how can I output this:
>
>|| year | team | total ||
>
>where each "team" occurs only once, and the "event" was discarded.
>
>Hope I made myself clear.
>Thanks in advance.
>
>This is a great mailing list.
>
>Regards,
>Sérgio Nunes
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>  
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Loading...