I think the error is sometimes related to the number of variables or length of variable / model names. Your approach works with minimal data:
library(stargazer)
stargazer(as.matrix(psych::describe(mtcars)), type = "text",
title="Descriptive statistics", digits = 2)
Descriptive statistics
========================================================================================
vars n mean sd median trimmed mad min max range skew kurtosis se
----------------------------------------------------------------------------------------
mpg 1 32 20.09 6.03 19.20 19.70 5.41 10.40 33.90 23.50 0.61 -0.37 1.07
cyl 2 32 6.19 1.79 6 6.23 2.97 4 8 4 -0.17 -1.76 0.32
disp 3 32 230.72 123.94 196.30 222.52 140.48 71.10 472 400.90 0.38 -1.21 21.91
hp 4 32 146.69 68.56 123 141.19 77.10 52 335 283 0.73 -0.14 12.12
drat 5 32 3.60 0.53 3.70 3.58 0.70 2.76 4.93 2.17 0.27 -0.71 0.09
wt 6 32 3.22 0.98 3.33 3.15 0.77 1.51 5.42 3.91 0.42 -0.02 0.17
qsec 7 32 17.85 1.79 17.71 17.83 1.42 14.50 22.90 8.40 0.37 0.34 0.32
vs 8 32 0.44 0.50 0 0.42 0 0 1 1 0.24 -2.00 0.09
am 9 32 0.41 0.50 0 0.38 0 0 1 1 0.36 -1.92 0.09
gear 10 32 3.69 0.74 4 3.62 1.48 3 5 2 0.53 -1.07 0.13
carb 11 32 2.81 1.62 2 2.65 1.48 1 8 7 1.05 1.26 0.29
----------------------------------------------------------------------------------------
Also exporting as .doc, try this and tell if you still get the error:
stargazer(as.matrix(psych::describe(mtcars)), type = "html",
title="Descriptive statistics", digits = 2, out="Descriptive_statistics.doc")
If this minimal command is working for you, try to outsource the column selection before you do stargazer:
df <- as.matrix(psych::describe(data_corruption[c("innovation_firm", "corruption", "ownership_gov", "competition", "gender_tm", "size_firm", "age_firm", "RandD", "export", "corruption_constraint")])
stargazer(df), type = "html", title="Descriptive statistics", digits = 2, out="Descriptive_statistics.doc")