I have a dataframe like this ,
AID=c("9671608","9671618","9677162")
dep=c(23,45,12)
t8=c(1,0,2)
a1_sum=c(2,10,1)
dataall=data.frame(AID,dep,t8,a1_sum)
> dataall
AID dep t8 a1_sum
1 9671608 23 1 2
2 9671618 45 0 10
3 9677162 12 2 1
I modified the value of a1_sum
at the second row as follows,
dataall$a1_sum[dataall$AID=="9671618"]=1
I did it sucessfully, but I am getting following warning message, even at times when I run some other different code related to this data as follows:
Warning messages: 1: Unknown or uninitialised column: 'a1_sum'.
What may be the reason for this?
Thank you.