Skip to content

Problem with Median

6 messages · Suhaila Haji Mohd Hussin, David Winsemius

#
On May 7, 2012, at 5:16 PM, Suhaila Haji Mohd Hussin wrote:

            
That fine for sending pictures to the family but NOT for communicating  
R code.
You were not attempting to replace the entire  column, but you were  
trying to replace 6 entries. So why not... :

a.AC [is.na(a.AC)] <- rep( median(a.AC$a, na.rm= TRUE) , 6)
What part of "I can't do anything with your jpeg to answer your  
questions about your dataframe" was difficult to understand? We do NOT  
want pictures from which we need to repeat data entry that you have  
already done.  The first virtue of a programmer being laziness.  
Console output is also very ambiguous.  Learn to use str() and dput()  
or dump().

?dput
?dump

And run the examples. please.
#
On May 8, 2012, at 4:35 AM, Suhaila Haji Mohd Hussin wrote:

            
I didn't say you were lazy. I implied that you were being  
insufficiently lazy. It would have been much easier  (had you read the  
Posting Guide and been properly lazy) to use either dump or dput to  
post machine readable versions of your data than to make a jpg and  
post it on an external website.

  I considered, but then decided that it was probablyunnecessary,  
offering a link to what is a fairly famous piece by Larry Wall  
explaining that one _should_ be lazy if one wants to be a good  
programmer. The Three Virtues: Laziness, Impatience, Hubris:

http://c2.com/cgi/wiki?LazinessImpatienceHubris