{"id":341,"date":"2018-02-15T12:14:28","date_gmt":"2018-02-15T12:14:28","guid":{"rendered":"http:\/\/science.ekqvist.fi\/blogi\/?p=341"},"modified":"2018-02-15T12:30:09","modified_gmt":"2018-02-15T12:30:09","slug":"some-r-tips","status":"publish","type":"post","link":"https:\/\/science.ekqvist.fi\/blogi\/r-tips\/some-r-tips\/","title":{"rendered":"Some R tips"},"content":{"rendered":"<p>Splitting a column to many columns \/ Text-to-Columns<br \/>\nPackage tibble.<br \/>\n<code>mtcars %>%<br \/>\n  tibble::rownames_to_column('Car') %>%<br \/>\n  slice(1:3)<\/code><\/p>\n<p><code>mtcars %>% tibble::rownames_to_column('Car') %>%<br \/>\n  tidyr::separate('Car',c('Brand','Model'), remove = F) %>%<br \/>\n  slice(1:5)<\/code><\/p>\n<p>Source: <a href=\"https:\/\/datascienceplus.com\/3-simple-data-transformation-tricks-in-r-that-are-often-not-used\/\" rel=\"noopener\" target=\"_blank\">datascience<\/a>: An online community for showcasing R &#038; Python tutorials. It operates as a networking platform for data scientists to promote their talent and get hired. Our mission is to empower data scientists by bridging the gap between talent and opportunity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Splitting a column to many columns \/ Text-to-Columns Package tibble. mtcars %>% tibble::rownames_to_column(&#8216;Car&#8217;) %>% slice(1:3) mtcars %>% tibble::rownames_to_column(&#8216;Car&#8217;) %>% tidyr::separate(&#8216;Car&#8217;,c(&#8216;Brand&#8217;,&#8217;Model&#8217;), remove = F) %>% slice(1:5) Source: datascience: An online community for showcasing R &#038; Python tutorials. It operates as a networking platform for data scientists to promote their talent and get hired. Our mission is <a class=\"read-more-excerpt\" href=\"https:\/\/science.ekqvist.fi\/blogi\/r-tips\/some-r-tips\/\">[&#8230;] Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[66],"tags":[],"_links":{"self":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts\/341"}],"collection":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":3,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":344,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/posts\/341\/revisions\/344"}],"wp:attachment":[{"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/science.ekqvist.fi\/blogi\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}