BIOL548O / Discussion

A repository for course discussion in BIOL548O
0 stars 0 forks source link

Separate but more complicated #35

Open madelynore opened 7 years ago

madelynore commented 7 years ago

@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 commented 7 years ago

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

aammd commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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

madelynore commented 7 years ago

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 commented 7 years ago

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