Displaying 2 results from an estimated 2 matches for "charmatrix".
2004 Nov 25
1
substitute accents
I have an openoffice spreadsheet with a column of
character strings.
Some of them contain accents.
I want to read it in R so I have saved it as a csv
file using Western Europe (ISO-8859-1) character set
(the default, I've tried other sets but it doesn't
help).
R reads it fine with
CharMatrix<-read.csv("test.csv",header=F,sep=",",as.is=TRUE);
Say I wan't to replace the 'o' with accent in the
first cell.
I've tried:
gsub('??','o', CharMatrix[1,1])
But, It doesn't make any substitution
Trying to find a solution I input the charac...
2004 Dec 04
2
write.table inconsistency (PR#7403)
There's an as.matrix() call in write.table that means the formatting
of numeric columns changes depending on whether there are any
non-numeric columns in the table or not. For example,
> x <- data.frame(a=1:10,b=1:10)
> write.table(x,sep=',',row.names=F)
"a","b"
1,1
2,2
3,3
4,4
5,5
6,6
7,7
8,8
9,9
10,10
> x <- data.frame(a=1:10,b=as.factor(1:10))