ez.append | R Documentation |
could be slow, commonly use together with ez.header
ez.append(df, newrow, print2scr = TRUE)
df |
df to be appended |
newrow |
a list, e.g., list("Ted", 25) <– use list can preserve element data type |
print2scr |
whether to print the new row to string (auto separated by tab), default TRUE |
returns a new df, old passed df does not change
although passing in newrow as a vector is fine, c(char,numeric) converts everything to char, bit when saving in excel, num formated as text
ez.header
# 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.