base.functions {kyotil} | R Documentation |
Some Base Functions
Description
cbinduneven binds together a list of matrixes/dataframes of different lengths, rows are matched by names binary returns binary representation of an integer. binary2 returns binary representatin of an integer with leading 0, the length of string is n. mysystem can call any exe file that is in the PATH f2c convert temperature from f to c/
Usage
mytable (..., exclude = if (useNA == "no") c(NA, NaN), useNA = "ifany",
dnn = list.names(...), deparse.level = 1)
cbinduneven(li)
binary(i)
multi.outer (f, ... )
myreshapelong(dat, cols.to.be.stacked, label.cols.to.be.stacked, new.col.name)
binary2(i, n)
f2c(f)
ftoi(f)
keepWarnings(expr)
meanmed(x, na.rm = FALSE)
myaggregate(x, by, FUN, new.col.name = "aggregate.value", ...)
myreshapewide(formula, dat, idvar, keep.extra.col=FALSE)
mysapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE, ret.mat = TRUE)
myscale(x)
mysystem(cmd, ...)
mytapply(X, INDEX, FUN = NULL, ..., simplify = TRUE)
read.sv(file, header = TRUE, ...)
read.tsv(file, header = TRUE, sep = "\t", ...)
table.prop(x,y=NULL,digit=1,style=2,whole.table.add.to.1=FALSE,useNA="ifany",
add.perc=FALSE, add.total.column = FALSE)
table.cases (case,group,include.all=TRUE,desc="cases")
table.cases.3(case,group1,group2)
unix()
mycor (x, use = "everything", method = c("pearson", "kendall", "spearman"),
alternative = c("two.sided", "less", "greater"), exact = NULL,
conf.level = 0.95, continuity = FALSE,
digits.coef=2, digits.pval=3,
...)
Arguments
exclude |
exclude |
dnn |
dnn |
deparse.level |
deparse.level |
add.total.column |
tbdi |
use |
tbdi |
method |
tbdi |
alternative |
tbdi |
exact |
tbdi |
conf.level |
tbdi |
continuity |
tbdi |
digits.coef |
tbdi |
digits.pval |
tbdi |
cols.to.be.stacked |
tbdi |
label.cols.to.be.stacked |
tbdi |
li |
a list |
i |
tbdi |
n |
tbdn |
f |
In multi.out, f is a function. |
case |
vector of 0/1 |
group |
vector of multi-group indicators |
formula |
a formula object. |
expr |
tbdexpr |
x |
tbdx |
na.rm |
tbdna.rm |
desc |
tbdby |
by |
tbdby |
whole.table.add.to.1 |
Boolean |
new.col.name |
tbdnew.col.name |
... |
tbd... |
dat |
tbddat |
idvar |
tbdidvar |
X |
tbdX |
simplify |
tbdsimplify |
USE.NAMES |
tbdUSE.NAMES |
ret.mat |
tbdret.mat |
cmd |
tbdcmd |
INDEX |
tbdINDEX |
file |
tbdfile |
header |
tbdheader |
sep |
tbdsep |
y |
tbdy |
digit |
tbddigit |
style |
tbdstyle |
FUN |
tbdFUN |
keep.extra.col |
tbdFUN |
useNA |
tbdFUN |
add.perc |
tbdFUN |
include.all |
tbdFUN |
group1 |
tbdFUN |
group2 |
tbdFUN |
Examples
binary(5) ### 101
binary2(5, 4)
a=data.frame("x"=1:2)
b=data.frame("y"=3:5);#rownames(b)[3]=""
cbinduneven(list(a,b))
## Not run:
# the formula in myreshapewide can only have one variable in the right hand side
myreshapewide(fi~week, dat, c("ptid","stim"))
myreshapelong(dat.201.neut, cols.to.be.stacked=c("MN.3","SF162","SVA.MLV"),
label.cols.to.be.stacked="antigen", new.col.name="y")
myaggregate(subset(dat.poc, select=c(HIV, trt)), list(dat.poc$f), function(x)
with(x, c(fisher.test(HIV, trt)$estimate, fisher.test(HIV, trt)$p.value)))
## End(Not run)