Re: [R] Plot from function

2011-08-15 Thread R. Michael Weylandt
I believe it's a problem in your variable name hsa-miR-98. R wants to interpret that as hsa less miR less 98. Since you don't have a variable called hsa, R (rightly) complains. Call ls() and see what R thinks your variables are named -- that will hopefully make the problem evident. Hope this

Re: [R] Plot from function

2011-08-15 Thread Duncan Murdoch
On 11-08-15 7:55 AM, rmje wrote: *I have the following function:* /plot_mi_time = function(mdata, miname) { mdata2 = mdata[row.names(hakat) == miname, ] You passed the expression hsa-miR-98 as miname. The simplest fix is to pass hsa-miR-98 instead. A more complicated alternative is to

Re: [R] Plot from function

2011-08-15 Thread rmje
ls(hakat) [1] X15h X18h X1h X21h X4h X9h -- View this message in context: http://r.789695.n4.nabble.com/Plot-from-function-tp3744428p3744592.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Plot from function

2011-08-15 Thread rmje
It workes using But what is this: p - plot_mi_time(hakat, hsa-miR-100) X1h X4h X9h X15h X18h X21h hsa-miR-100 384 1038 1503 1511 2603 2899 *Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ* -- View this message in context:

Re: [R] Plot from function

2011-08-15 Thread rmje
Problem solved! -- View this message in context: http://r.789695.n4.nabble.com/Plot-from-function-tp3744428p3744695.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list