tag:blogger.com,1999:blog-2550386066385582083.post853560928677675393..comments2023-10-05T06:30:41.397-07:00Comments on R for Public Health: From continuous to categoricalSlawa Rokickihttp://www.blogger.com/profile/17017311098539878072noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2550386066385582083.post-28191192127807096192013-04-22T13:05:11.406-07:002013-04-22T13:05:11.406-07:00Glad you like the blog! I don't think it's...Glad you like the blog! I don't think it's possible to have the first or last interval closed on both sides. However, you can do something like <br /><br />cut(mydata$Age, c(-Inf, 10, 20, 30, Inf)) <br /><br />and that would make sure to capture every number less than 10 and greater than 30. Slawa Rokickihttps://www.blogger.com/profile/17017311098539878072noreply@blogger.comtag:blogger.com,1999:blog-2550386066385582083.post-33143623404744069522013-04-20T18:22:00.508-07:002013-04-20T18:22:00.508-07:00Thank you Slawa Rokicki, your idea of helping us u...Thank you Slawa Rokicki, your idea of helping us use R is great, especially giving examples from STATA.<br /><br />Cut command creates a series of intervals that are all closed on one side and open on the other: how do i make the last interval (or first) closed on both sides so as not to have excluded observations?<br /><br />Thank you,<br />Anonymoushttps://www.blogger.com/profile/02532583222718823242noreply@blogger.com