Seq command not working with a variable
seq (-1,2,0.5) is working fine, but z= seq(-1,2,0.5) or z<-seq(-1,2,0.5) are not working.
I am using R Studio version 4.0.1
R Introduction-to-basics-of-R 06-07 min 20-30 sec
Answers:
I tried this on my end. It's working, as given below:
> seq(-1, 2, 0.5)
[1] -1.0 -0.5 0.0 0.5 1.0 1.5 2.0
> var <- seq(-1, 2, 0.5)
> var
[1] -1.0 -0.5 0.0 0.5 1.0 1.5 2.0
> z <- seq(-1, 2, 0.5)
> z
[1] -1.0 -0.5 0.0 0.5 1.0 1.5 2.0
> z = seq(-1, 2, 0.5)
> z
[1] -1.0 -0.5 0.0 0.5 1.0 1.5 2.0
Thank you for the reply. But still no help. Variable doesn't seem to be working with seq command
You might want to look at the documentation of seq function once.
Now the problem has been resolved. Thanks