my.table: Tabulates differrent lengths of vector by overlapping names

Description Usage Arguments Details Value Author(s) Examples

View source: R/utilar.R

Description

my.table, cross tabs between two vector but first overlaps their names to make sure the cross tab is legit.

Usage

1
my.table(x,y)

Arguments

x

a vector with names to tabulate with another vector

y

a vector with names to tabulate with another vector

Details

my.table, cross tabs between two vector but first overlaps their names to make sure the cross tab is legit. vector with names is required. useNA is always set to "if any". Both arguments are required.

Value

Returns a table cross tabulating x and y with overlapping names

Author(s)

Arshi Arora

Examples

1
2
3
4
5
6
7
8
set.seed(123)
x<-sample(1:4, 20, replace=TRUE)
names(x)=paste0("sample",1:length(x))

y<-sample(1:4, 25, replace=TRUE)
names(y)=paste0("sample",1:length(y))

my.table(x,y)

arorarshi/utilar documentation built on Feb. 13, 2021, 10:22 a.m.