-
Notifications
You must be signed in to change notification settings - Fork 420
Closed
Description
unnest refuses to process data frames with syntactically invalid column names (e.g. containing spaces or beginning with numbers):
library(dplyr)
library(tidyr)
dat <- data.frame("foo bar" = I(list(1:2, 3)), check.names = F)
unnest(dat)
# Error in parse(text = x) : <text>:1:5: unexpected symbol
#1: foo bar
# ^
unnest_(dat, names(dat))
# Error in parse(text = x) : <text>:1:5: unexpected symbol
#1: foo bar
# ^
dat %>% rename(foobar=`foo bar`) %>% unnest
# Source: local data frame [3 x 1]
#
# foobar
# (dbl)
#1 1
#2 2
#3 3
I don't know if it's a bug or if I'm using the function wrongly, but I think it worked in previous versions of tidyr. I'm packageVersion("tidyr") ‘0.4.1’ and packageVersion("dplyr") ‘0.4.3’
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels