g = 9.8
tt = c(10,15,16)
n = length(tt)
emp =NULL
for(i in n){
emp[i] = tt[i]*4
print(emp)
}
After running this code in R, i got reply like below:
 > for(i in n){
 + emp[i] = tt[i]*4
 + print(emp)
 + }
[1] NA NA 64
Any ideas about how to remove NA values or solve this problem?