[R] write.csv / string extraction and field limits
kwaj
kingsley.oteng at gmail.com
Fri Sep 7 03:19:09 CEST 2007
Hello,
I have a peculiar problem which I am hoping I can get help on.
I am using the write.csv command to write a matrix structure to a file,
which I later read in excel. The command works quite well for most strings
and numerical values in the matrix structure.
However, I have found that when a field in the matrix contains a string of
long length, when the matrix is finally written the file - the field shows
up as "NA". I am assuming write.csv has a limit on the field size? Maybe 16
characters?
Assuming the above is correct - I tried to extract a portion of the string
using the 'substring' command and enter the extracted portion into the field
before using the write.csv command. However I find, that when a string is
extracted, the output from write.csv generates a NA in the file output.
My questions are:
1) Does write.csv have a limit on the size of strings in the matrix fields?
Is there anyway to place large strings in the field?
2) Is there anyway to make the substring command or an alternative but
similar command, compatible with write.csv? I have tried
'as.character(substring(phrase, min, max)' and that does not seem to work
cheers
--
View this message in context: http://www.nabble.com/write.csv---string-extraction-and-field-limits-tf4395535.html#a12534347
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list