Hi Kristi,
The period is there for a reason. If you want to extract that column like this:
x<-data.frame(a=1:3,b=2:4,c=3:5)
> names(x)[3]<-"dif of AB"
> x
a b dif of AB
1 1 2 3
2 2 3 4
3 3 4 5
> x$dif of AB
Error: unexpected symbol in "x$dif of"
> x$'dif of AB'
[1] 3 4 5
Hi R user,
I wanted to change a column name with new one but it comes with "." where
there was space. Is there any way to keep my formate with space?
Here what I found
Images<-stack(imageA,imageB,imageC)
names(Images)[3]<-c("dif of AB")
head(Images)
It gives the column name of 3 as a "dif.of.
2 matches
Mail list logo