File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Languages and the fly likes problem about set operation and computation after split in  R language Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "problem about set operation and computation after split in  R language" Watch "problem about set operation and computation after split in  R language" New topic
Author

problem about set operation and computation after split in R language

bird best
Greenhorn

Joined: Jun 07, 2012
Posts: 2
hi,
I met some problems in R, please help me.
1. How to do a intersect operation among several groups in one list, without a loop statement? (I think It may be a list)
create data:
I want to get intersection of product between every year. I know the basic is:

this will give the correct answer:

above code lacks reusability, so It should use a for loop:

It's correct too, but stll too complex, so my question is:
Can I do the same thing just use another similar intersect function (without for/repeat/while).
What's this simple function's name ?

2.how to do a relative computation after split (notice: not befor split)?
create data:

I want compute relative value in the every group, what I mean is , I want get the result is just like below:
I think to use a loop maybe work, but Is there no direct method on list?

3.how to do a sorting after split, It's just like above question, what I want is sorting by value:

4. how to do a filtering after split, Yes, It's just like above quetion, what I want is filtering out data which value is more than 1000:
bird best
Greenhorn

Joined: Jun 07, 2012
Posts: 2
can anyone help me?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
Welcome to the Ranch

Maybe nobody can help, sorry. Maybe nobody around here knows R. If you find another forum, feel free to post, but be sure to tell them you posted here, too.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem about set operation and computation after split in R language
 
Similar Threads
Generate random id on an html page
resultset is not working properly
problem while inserting date field in oracle data base
Need help in data displaying
String Tokenizing doubt