Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better column skip function #209

Closed
MySchizoBuddy opened this issue Jun 28, 2015 · 1 comment
Closed

Better column skip function #209

MySchizoBuddy opened this issue Jun 28, 2015 · 1 comment

Comments

@MySchizoBuddy
Copy link

Request for a better column skip syntax because the below is getting ridiculous and slow to execute

data <- read_csv("data/690150TY.csv", skip = 1, col_types = list(
  `Date (MM/DD/YYYY)` = col_date("%m/%d/%Y"),
  `GHI source` = col_skip(),
  `DNI source` = col_skip(),
  `DHI source` = col_skip(),
  `GH illum (lx)` = col_skip(),
  `GH illum source` = col_skip(),
  `Global illum uncert (%)` = col_skip(),
  `DN illum (lx)` = col_skip(),
  `DN illum source` = col_skip(),
  `DN illum uncert (%)` = col_skip(),
  `DH illum (lx)` = col_skip(),
  `DH illum source` = col_skip(),
  `DH illum uncert (%)` = col_skip(),
  `Zenith lum (cd/m^2)` = col_skip(),
  `Zenith lum source` = col_skip(),
  `Zenith lum uncert (%)` = col_skip())
  )

I'm not even done yet, lot more columns to skips. I cannot use the (dc____d) syntax because some columns are date time and factors.
The best way now is to read all columns and then use dataframe subsetting to get the columns I want.

@hadley
Copy link
Member

hadley commented Jul 4, 2015

Duplicate of #72

@hadley hadley closed this as completed Jul 4, 2015
@lock lock bot locked and limited conversation to collaborators Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants