I was wondering why R sees (1:10) as an vector counting from 1 to 10
And (0.1:1.0) as 0.1?
Should i define the steps from 0.05 by myself? or is there a trick to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The colon makes a sequence from the first number to last with steps of exactly
1. Since in0.1:1that is less than one step it only returns the first number. I think you are looking forseq(0.1,1,length=10)?