search for: factor2char

Displaying 3 results from an estimated 3 matches for "factor2char".

2013 May 22
1
column width in .dbf files using write.dbf ... to be continued
...answer to my previous message ("Is there a way to define "manually" columns width when using write.dbf function from the library foreign ?"), so I tried to modify write.dbf function to do what I want. Here is my modified version : write.dbfMODIF <- function (dataframe, file, factor2char = TRUE, max_nchar = 254, width = d) { allowed_classes <- c("logical", "integer", "numeric", "character", "factor", "Date") if (!is.data.frame(dataframe)) dataframe <- as.data.frame(dataframe) if (any(sappl...
2010 Jan 13
1
column width in .dbf files using write.dbf ... to be continued
...nswer to my previous message ("Is there a way to define "manually" columns width when using write.dbf function from the library foreign ?"), so I tried to modify write.dbf function to do what I want. Here is my modified version : write.dbfMODIF <- function (dataframe, file, factor2char = TRUE, max_nchar = 254, width = d) { allowed_classes <- c("logical", "integer", "numeric", "character", "factor", "Date") if (!is.data.frame(dataframe)) dataframe <- as.data.frame(dataframe) if (any(sappl...
2012 Aug 13
4
write.dbf error: invalid subscript type 'list'
...)* I am getting this error. *Error in c<logical="L", integer="N",numeric="F",charachetr="C", : invalid subscript type 'list' Calls: write.dbf -> <Anonymous>* If I added * write.dbf(df,"H:\\CIV\\CIVProject\\DATA\\plotdata.dbf",factor2char=TRUE,max_char=254) * Now, I get error as these are unused arguments. If I write it to text file using write.table, the text file looks like this. *"ID" "simloglkhd" "1" 1 6.72782753120542 "2" 2 3.37685863056105 "3" 3 3.28498537979818 "4&quot...