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

Separate but more complicated #35

Open
madelynore opened this issue Feb 15, 2017 · 6 comments
Open

Separate but more complicated #35

madelynore opened this issue Feb 15, 2017 · 6 comments

Comments

@madelynore
Copy link

madelynore commented Feb 15, 2017

@aammd
I have the same issue in several different places in my data set, and I can't figure out a work around. I'll use Location as an example:
One column contains location information. For some lines, that is specific location, town/county, state. For others, its town, state. Some don't even have state. For this one, essentially I just want State separated out.

I want to write an if/else statement, that distinguishes those lines that have more than 1 comma (the "extra" and "fill" features of the separate function doesn't do what I want). Or I need to somehow have the function read the separate function from the left.

Any tips?

Thanks,
Maddie

@madelynore
Copy link
Author

@aammd
Also, I can't seem to get my raw data folder onto Git Hub?

@aammd
Copy link
Member

aammd commented Feb 15, 2017

@madelynore answering these in reverse order -- about the raw data folder. I have an hypothesis: you have to add and commit a file in the folder first. Check the git tab in Rstudio -- you may see the raw data there, perhaps with a yellow question mark next to it (ie not yet added to git)? if so, add and commit it, then push. if you don't see anything, try pushing again. If that still doesn't work, let me know

@aammd
Copy link
Member

aammd commented Feb 15, 2017

@madelynore I know you said you tried making separate work, but I just wanted some more details. did you try fill = "right"? that certainly sounds like it fits the situation you describe. If that's not it I'd need to see the problem for myself when you get the data on github

@aammd
Copy link
Member

aammd commented Feb 15, 2017

Just read up on this, certainly looks like extract is like turbo-charged separate

@madelynore
Copy link
Author

Only the raw data folder shows up in the git tab. The raw data files don't show up at all, so I can't commit/ push them. And I can't commmit the folder.

Re: separate. I tried fill="right", it works for some cases, but not others, because is row has a slightly different amount of location data.

I'm looking over extract, and I don't really get how it works. I just want to separate the last thing after a "," in a row from the rest of the text in that row.

@madelynore
Copy link
Author

Finally figured out how to get the raw data up. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants