[R] Coding problem: How can I extract substring of function callwithin the function

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Aug 13 23:55:35 CEST 2009


On Aug 13, 2009, at 5:30 PM, Pitt, Joel wrote:

> Thanks. It's a great solution to part of my problem. It provides the  
> functionally I want would be no harder for students to use than my  
> approach. I'm still interested in how to make what I was trying to  
> do work -- simply to add to my own R programming proficiency.

I wasn't going to really chime in, but I couldn't help it given the  
irony in your last sentence (sorry, I don't mean to sound like an ass).

I think trying to help your students with some "bumps on the road" is  
admirable, but this seems just a bit misdirected. As you say, you are  
on a quest to add to your R programming proficiency, and will apply  
this newly founded technique to actively handicap your students'  

I guess you're teaching some intro stat analysis class, and waving  
over the fact that functions like mean explicitly return NA in the  
presence of NA's, but this is important to know and recognize when  
analyzing any real data, because there will surely be NA's "in the  
wild." Knowing that you should consciously and deliberately deal with/ 
ignore them from the start might be a good first/early lesson for  
students to digest.

Like I said, I don't mean to sound like an ass, but I think glossing  
over details of working with data should be avoided. Your other  
additions, like adding options to plotting/graphing functions, seem  
less harmful to me. But if you're trampling over some base:: function  
for something trivial like changing the value of one default parameter  
to something else, you might as well just get them to learn how to use  
the ?<function_name> asap as well.


Steve Lianoglou
Graduate Student: Computational Systems Biology
   |  Memorial Sloan-Kettering Cancer Center
   |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

More information about the R-help mailing list