tidyr is an R package by Hadley Wickham for cleaning and reshaping data, designed to use the magrittr pipe (%>%) so as to interact well with dplyr and similar pipeable packages which emphasize tidy data.
I love the reshape2 package because it made life so doggone easy. Typically Hadley has made improvements in his previous …
r reshape2 tidyrA have the following tibble: structure(list(age = c("21", "17", "32", "29", "15"), gender = structure(c(2L, 1L, 1L, 2L, 2L), .Label = c("Female", "…
r tidyrI have a data frame that needs to be split into two tables to satisfy Codd's 3rd normal form. In …
r tidyrThe documentation for tidyr suggests that gather and spread are transitive, but the following example with the "iris" data shows …
r tidyrSuppose I have some count data that looks like this: library(tidyr) library(dplyr) X.raw <- data.frame( …
r dplyr tidyrI have some data like below: x.row10 <- setNames(data.frame(letters[1:3],1:3,2:4,3:5,4:6,5:7,6:8,7:9), c("names",2004:2009,2012)) # names 2004 2005 2006 2007 2008 2009 2012 #1 a 1 2 3 4 5 6 7 #2 b 2 3 4 5 6 7 8 #3 c 3 4 5 6 7 8 9 …
r tidyrI'm trying to take columns that are in long format and spread them to wide format as shown below. I'd …
r tidyrMy data looks like this: # A tibble: 6 x 4 name val time x1 <chr> <dbl> <date&…
r tidyr