[R] How to merge two tables
Xiyan Lon
xiyanlon at gmail.com
Mon Feb 22 19:46:24 CET 2016
Dear all,
I am currently studying categorical data analysis, if I have two tables:
R> cross
sex cross death count
1 FEMALE WEF YES 26
2 MALE WEF YES 14
3 FEMALE OGG YES 32
4 MALE OGG YES 43
5 FEMALE TGA YES 8
6 MALE TGA YES 10
7 FEMALE WEF NO 6
8 MALE WEF NO 7
9 FEMALE OGG NO 26
10 MALE OGG NO 12
11 FEMALE TGA NO 16
12 MALE TGA NO 26
R> age
sex age death count
1 FEMALE 17Y YES 16
2 MALE 17Y YES 4
3 FEMALE 18Y YES 40
4 MALE 18Y YES 51
5 FEMALE 17Y NO 32
6 MALE 17Y NO 42
7 FEMALE 18Y NO 26
8 MALE 18Y NO 15
- How to merge two tables.
- How to expand both tables such as:
sex age cross death
FEMALE 17Y WEF YES
...
FEMALE 18Y TGA NO
Warm regards,
Xiyan Lon
This email has been sent from a virus-free computer protected by Avast.
www.avast.com <https://www.avast.com/sig-email>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
[[alternative HTML version deleted]]
More information about the R-help
mailing list