stringsAsFactors = FALSE for the data frame input
diff --git a/R/add_header_above.R b/R/add_header_above.R
index dea0271..6beb5a0 100644
--- a/R/add_header_above.R
+++ b/R/add_header_above.R
@@ -98,7 +98,8 @@
if (is.data.frame(header)){
if(ncol(header) == 2 & is.character(header[[1]]) & is.numeric(header[[2]])){
- header <- data.frame(header = header[[1]], colspan = header[[2]])
+ header <- data.frame(header = header[[1]], colspan = header[[2]],
+ stringsAsFactors = FALSE)
}
else {
stop("If header input is provided as a data frame instead of a named vector ",
@@ -238,7 +239,8 @@
if (is.data.frame(header)){
if(ncol(header) == 2 & is.character(header[[1]]) & is.numeric(header[[2]])){
- header <- data.frame(header = header[[1]], colspan = header[[2]])
+ header <- data.frame(header = header[[1]], colspan = header[[2]],
+ stringsAsFactors = FALSE)
}
else {
stop("If header input is provided as a data frame instead of a named vector ",