Hi > -----Original Message----- > From: R-help <r-help-boun...@r-project.org> On Behalf Of Bogdan Tanasa > Sent: Thursday, September 20, 2018 9:26 AM > To: r-help <r-help@r-project.org> > Subject: [R] about the series of numbers > > Dear all, > > if I may ask please a question that is likely very naive : > > shall I write in R > "1:9", it will generate "1 2 3 4 5 6 7 8 9" > > shall I write > "0.1:0.9", why does it generate only 0.1 ?
Because it is said in help page!!! "For other arguments from:to is equivalent to seq(from, to), and generates a sequence from *from* to *to* in steps of 1 or -1." sequence from 0.1 to 0.9 in steps 1 starts at 0.1 but the second item is 1.1 which is bigger than 0.9 therefore the result is only one item 0.1. Cheers Petr > > thank you ! > > -- bogdan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních partnerů PRECHEZA a.s. jsou zveřejněny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner’s personal data are available on website: https://www.precheza.cz/en/personal-data-protection-principles/ Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer: https://www.precheza.cz/en/01-disclaimer/ ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.