Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Multiple header rows mini-vignette? #492
added a commit
Jul 10, 2018
referenced this issue
Jul 10, 2018
I assume it will go something like this and here's how to access the example sheet:
library(magrittr) library(readxl) (cnames <- readxl_example("clippy.xlsx") %>% read_excel(sheet = 2, n_max = 0) %>% names()) #>  "name" "species" "death" "weight" readxl_example("clippy.xlsx") %>% read_excel(sheet = 2, skip = 2, col_names = cnames) #> # A tibble: 1 x 4 #> name species death weight #> <chr> <chr> <dttm> <dbl> #> 1 Clippy paperclip 2007-01-01 00:00:00 0.9
Created on 2018-07-10 by the reprex package (v0.2.0.9000).
Thanks for taking this on @apreshill!
If you look at the issue I opened (#486), I often have files where the first row isn't enough header to uniquely identify a variable, and we often need the data dictionary to be kept with the name. Following the
My suggestion if you want to add that as a use case is to move the metadata extraction up to Step 1, and then
This sounds good, and a nice solution- although for my own use cases (I've had several), the simpler solution was what I needed. So I'm wondering if I could frame this solution using
I'm hoping this vignette could kick off with the simplest possible example of this phenomenon + solution, then ramp up to some of the more complicated (and realistic) ones. Hopefully @brianwdavis will contribute his.
I'm at useR! right now and not in a position to review this at the moment. I think the main thing is to coordinate what needs to be true about, e.g., the clippy example sheet to support the vignette. It's always possible to add a 3rd sheet with even more pathological behaviour.