From: <smckinney_at_bccrc.ca>

Date: Wed, 04 Nov 2009 22:10:28 +0100 (CET)

> What makes you think this is a bug in R?

*> > CN_state_log_sum=3Dfunction(Tot_log_sum){ #estimate copy number state
*

*> > for the log
*

*> [...]
*

*> > }
*

*> >
*

*> > When I try to run it in the loop:
*

*> > for (j in 1:length(BB_mean_ref)){ # find copy number states (0 for
*

*> > homozygous
*

*> > deletion, 1 for hemizygous deletion, 2 for neutral, 3 for single
*

*> > amplification,
*

*> > 4 for multiple amplification)
*

*> > state_log_sum[j]=3DCN_state_log_sum(Tot_log_sum[j])
*

*> > state_sum_log[j]=3DCN_state_sum_log(Tot_sum_log[j])
*

*> > }
*

*> > I get the error message:
*

*> > Error in Im(Tot_sum_log) !=3D 0 || Re(Tot_sum_log) <- 2 :
*

*> > could not find function "||<-"
*

> The error message indicates that the problem happens in the function

*> CN_state_sum_log() rather than CN_state_log_sum(), so it's hardly
*

*> surprising that changing the latter doesn't have any effect.
*

> My guess: you've go a condition (Re(Tot_sum_log)<-2), which is

*> mistaken for the assignment operator "<-" by the R parser. Adding some
*

*> whitespace (Re(Tot_sum_log) < -2) should help both R and human readers
*

*> to make sense of it.
*

> Best,

> Stefan

> https://stat.ethz.ch/mailman/listinfo/r-devel

R-devel_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 04 Nov 2009 - 21:14:10 GMT

Date: Wed, 04 Nov 2009 22:10:28 +0100 (CET)

> -----Original Message-----

*> From: r-devel-bounces_at_r-project.org [mailto:r-devel-bounces_at_r-
**> project.org] On Behalf Of Stefan Evert
**> Sent: Wednesday, November 04, 2009 4:40 AM
**> To: michael_karsh_at_earthlink.net
**> Cc: R-bugs_at_r-project.org; r-devel_at_stat.math.ethz.ch
**> Subject: Re: [Rd] Cannot Change Function (PR#14041)
*

>=20

> What makes you think this is a bug in R?

>=20

> > Whenever I try changing a function, it keeps coming up with the same

> > error> > message.> >> > I have the function

>=20

> The error message indicates that the problem happens in the function

>=20

> My guess: you've go a condition (Re(Tot_sum_log)<-2), which is

Adding parentheses around the negative number is the only way to keep such an expression robustly safe given the various whitespace alterations that happen as such text passes through different parsers, editors, mailers, proportional pitch font displays (which can fool human readers) ..= .

( ( Im(Tot_sum_log) !=3D 0 ) || ( Re(Tot_sum_log) < (-2) ) )

Best

Steven McKinney

>=20

> Best,

> Stefan

>=20> R-devel_at_r-project.org mailing list

> ______________________________________________

> https://stat.ethz.ch/mailman/listinfo/r-devel

R-devel_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 04 Nov 2009 - 21:14:10 GMT

*
This archive was generated by hypermail 2.2.0
: Wed 04 Nov 2009 - 21:20:20 GMT
*