Hello. I have the following for-loop:
for(x in seq(1,2,0.1)){
k=4
b=5
f=k*x+b
print(f)
}
It gives the result as following:
[1] 9
[1] 9.4
[1] 9.8
[1] 10.2
[1] 10.6
[1] 11
[1] 11.4
[1] 11.8
[1] 12.2
[1] 12.6
[1] 13
I'd like to tranform these values into a single vector: in other words, I need to get the following result of the loop procession:
[1] 9 9.4 9.8 10.2 10.6 11 11.4 11.8 12.2 12.6 13
I've already tried f<-as.vector(f)
and f<-c(f)
, but this tranformation gives only the last value of the sequence: 13
Could you,please,help me to solve this task?
Thank you for your effort!