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

separate convert with stringsAsFactors = FALSE #99

Closed
kismsu opened this Issue Aug 25, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@kismsu

kismsu commented Aug 25, 2015

Hi, I know that you are not a big fan of stringsAsFactors. However

df <- data.frame(x = c("a.b", "a.d", "b.c"))
df %>% 
    separate(x, c("A", "B"), convert = TRUE) %>% 
    str()
'data.frame':   3 obs. of  2 variables:
 $ A: Factor w/ 2 levels "a","b": 1 1 2
 $ B: Factor w/ 3 levels "b","c","d": 1 3 2

Would it be a good idea to send stringsAsFactors = FALSE to separate?

@hadley

This comment has been minimized.

Member

hadley commented Aug 25, 2015

Hmmm, I had lapply(l, type.convert, as.is = FALSE) and I don't understand why. I'm almost certain it should be TRUE.

@hadley

This comment has been minimized.

Member

hadley commented Aug 25, 2015

Fixed in c77b42e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment