Created
February 22, 2019 07:53
-
-
Save djouallah/822542e6d043148a293fde380a0cfff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readxl) | |
library(tidyverse) | |
df1 <- read_excel("/ACTUAL/tracker_Register.xlsx") | |
df2 <- select(df1,'Row ID','Panel Qty',Accepted, Tracker) | |
df3 <- gather(df2,category,date,-"Row ID",-"Panel Qty") | |
df4 <- filter(df3,!is.na(date)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In answer to your question, I wouldn't call this 'bad practice' - there are worse things than this, but it does have the unfortunate feature of meaningless intermediate variable names that distract from what is goin on.
I find variable names are a nice opportunity to communicate what is happening, and the pipe lets use them only when we want to. So I would certainly sympathise with not using one single chain - that can get just as unwieldy.
In this case the intermediate case looks nice to me:
Edit: accidentally copy pasted the df1,2,3 etc.