Re: [Rd] bug in default print method / floating point problem?

2013-12-05 Thread Prof Brian Ripley
On 05/12/2013 21:50, Pablo Barberá wrote: In R 3.0.2, I found this weird behavior: 7/0.07 [1]100 6/0.06 [1] 100 There's one space missing between the bracket and the 100 in the first case. I don't know if this is a known bug or not. It might have something to do with precision of floating p

[Rd] Undocumented S4 method Warning For Bracket

2013-12-05 Thread Dario Strbenac
Hello, With R version 3.0.2 Patched (2013-10-30 r64123) I don't see warnings that I get in R Under development (unstable) (2013-11-03 r64145) The warnings are like : Undocumented S4 methods: generic '[' and siglist 'BayMethList,ANY,ANY' The function actually looks like : setMethod("[", "Bay

[Rd] bug in default print method / floating point problem?

2013-12-05 Thread Pablo Barberá
In R 3.0.2, I found this weird behavior: > 7/0.07 [1]100 > 6/0.06 [1] 100 There's one space missing between the bracket and the 100 in the first case. I don't know if this is a known bug or not. It might have something to do with precision of floating point numbers: > options(digits=22) > 7/0.07

[Rd] S4 method for '[' with extra arguments: distinguishing between x[i] and x[i, ]

2013-12-05 Thread Renaud Gaujoux
Hi, I want to implement a '[' for an S4 class, that behaves differently when called with a single index argument or multiple indexes (possibly missing), like what happens when subsetting matrices x[i] vs. x[i, ]. I manage to do it using nargs() and checking if drop is missing (see code below), bu