ddotta / tablexlsx

R package to export data frames from R to xlsx workbook
https://ddotta.github.io/tablexlsx/
Other
16 stars 1 forks source link

More understandable error message in `mergecol` when column does not exist #20

Closed JulienBlasco closed 3 months ago

JulienBlasco commented 5 months ago

The following code produces a not so understandable error:

toxlsx(iris, path=tempdir(), mergecol = "ssspecies")
# Erreur dans if (vector[i] != vector[i - 1]) { : 
#   l'argument est de longueur nulle

Desired result

The function should warn that the column does not exist in the object.