ez.header | R Documentation |
wrapper of data.frame(), commonly use together with ez.append
ez.header(..., cols = NULL, stringsAsFactors = FALSE)
... |
e.g., col1=character(n), 'col2'=numeric(n) where n defaults to 0, represents n of rows in the data frame, ” around col name is optional |
cols |
optional (default=NULL), specify only if massively assign col names (i.e. header), see example |
stringsAsFactors |
defaults to FALSE (data.frame() defaults to TRUE) |
returns an (empty) df with specified col names
ez.append
postdoc=ez.header(name=character(),'salary'=numeric())
postdoc=ez.header(cols=c('name','salary')) # <--note that 'name','salary' data type is logical in this usage
# typical use:
results = ez.header(variable=character(),class=character(),n=numeric())
vars=colnames(x)
for (var in vars) {
var=
cls=
n=
results = ez.append(results,list(var,cls,n))
}
ez.savex(results,'x.xlsx')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.