Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

Anyone use R for data manipulation? I'm trying to get a subset and struggling with my code... (basically I'm trying to select stuff based on different values in different columns, but I just don't know how to word it).

I got my questions answered at in under 10 minutes. Go to now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer


To see the expert answer you'll need to create a free account at Brainly

You'd likely be better off asking this in the CompSci section of the site. And it'd be good to include some source code and data.
R is good for data manipulation?
Yeah I suspected that, I just figured I'd wait to see if anyone used R. Programmers don't really use R do they? And yepp!

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

I have never used R and nor I am looking forward to using it ... btw what about sql or my sql?
Haven't used sql/my sql before. Nah don't worry R is VERY useful does take some learning but way better than excel once you learn it
use nested if statements that cycle through your data and break if a requirement isn't met?
Thanks for your help, I think I will have to come back to this later when my brain is working a little better, I've been trying to type a description of what I am trying to do and not getting anywhere!
while(!eof) //while you haven't reached the end of the file (eof) if (mindate
Hmmm.. What if I show you the way I was doing it in excel, would that make any sense to you? (p.s. I definitely not from a programing background.. to tell you the thruth I've never used a loop before)
oh dear I can't even spell today! Anyway if you look to the far right of the sheet (which I cut alot of data out of so you could see better) you will see the excel functions I've used - basically just to get a percentage of each landuse in the "LCT_1990" column out of each "FID_buffer931" code (which is each site - first column). My "FID_buffer931" gets down to 19, so I don't want to keep doing it manually in excel like I am doing. I was originally trying to stick "q<-subset(B,"LCT.1990=bare" & "FID.poly9093=1")" in R just to select one landuse in one site (yes I can hear you cringe at that awful - and wrong - piece of code).
1 Attachment
hmmm and You're sure that R is the language you'd like to use? Sorry I might be a bit slow at this, your variable names are not terribly stranger friendly. What are you having difficulty with? Is it where you are using sumif in excel?
Hmm yeah, mainly because its the only other one I remotely know how to use, and I know it can be used for that type of thing.. I'm just missing the how part :P Yeah, they are pretty bad.. that's why I was reluctant to go on lol. Anyway basically "LCT_1990" = is landuse and "FID_buffer931" = site. You see I know how to do it in excel - like you can see - but to do the whole dataset (which is much longer) I would have to keep pasting those excel functions under each block of "sites" or "FID_buffer931" numbers (separated by the colours). I suppose I was trying to be lazy :P and I suspect I should probably go to an R forum hehe.
Anyway please don't waste time on it! I'm going to bed :)
In java or c++ once you'd read these in, I would make them in to objects with, then pass them to functions which would handle the calculations. I'm sorry I was expecting a bit of debugging rather than thinking the whole thing out.

Not the answer you are looking for?

Search for more explanations.

Ask your own question