[R] Scrolling behavior in View()

Duncan Murdoch murdoch at stats.uwo.ca
Sun Jun 7 16:15:41 CEST 2009


On 07/06/2009 9:50 AM, Jose Quesada wrote:
> Hi,
> 
> I've realized that the scrolling behavior in View() is unlike most other
> applications. It seems that the minimum scroll size is very large for
> large objects( i.e., a vector of 1M integers), and it might be that this
> scroll is proportional to the size of the object.
> Try this:
> a = 1:1000000
> View(a)
> Click once on the scroll arrow down. It will move to item 1001.
> 
> It could be that the scroll size is 1/1000 object length.
> 
> If this is so, it's a bit of a problem, since there's no way to View say
> cell 500... unless one does a View(head(a, 500)), which kind of defeats
> the point of view.
> 
> Is this behavior by design? If so, wouldn't it be better to make it
> optional (as it breaks GUI conventions of mostly any OS for scrolling
> behavior)? An argument for view to turn this off would be great.

You didn't say which version or platform you were using.  I see it on 
Windows 2.9.0 and R-devel.

The behaviour you describe (scrolling 1/1000 of the object) happens when 
the object has more than 10000 items in it.  If I temporarily disable 
it, things are worse:  then there is no easy way I can find to get to 
the bottom of the object.   There appear to be some 16 bit overflows 
happening if you try to drag the scrollbar slider down too far.  The 
reason for this is that Windows only provides 16 bits of information in 
the scrolling message; however, there are workarounds to get 32 bit 
positions.  I'll see if I can add them to our code.

Duncan Murdoch




More information about the R-help mailing list