Hello,

I am trying to "manually" choose the width (i.e. number of character
allowed) of columns containing text when creating dbf. files using write.dbf
(library foreign).
In particular, I want to define this width when the column have to contain
text but is empty.

By default, write.dbf give a warning message then choose the width equal to
the number of character in the column title.


Example:

df<-data.frame(INDEX=1:10, TEXT=NA_character_)
write.dbf(df, paste(choose.dir(), "//test.dbf",sep=""))
# Give a warning message but create the dbf file. The width of the column
"TEXT" is 4 as the number of character in the word TEXT !


Thanks for your help,

Arnaud

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to