Problems with ladder.correction function (Fragman package)

Hi everybody. I´ve just started working with Fragman package, and i´ve found a little big problem. Creating a ladder and attaching it to the data is one of the crucial steps for the analysis. Usually, the ladder.info.attach() works well, but sometimes it doesn´t match exactly with your points, so you have to use ladder.correction function to fix it. You have the pssibility to do it both automatic and manually. Most of the times, the first options works just well, but from time to time you are required to do it manually in order to get it right. There comes the problem. In manual mode you have to click exactly over the points, wich is sometimes pretty difficult, because the window is so small (Image 1). If you have multiple bar really close together, it seems impossible to tell them apart, so selection of the point is pretty random. Im sure there has to be an option to zoom while selecting the points, or fixin one individual point without having to redo the hole ladder, but i really don´t know how. So i´d really appreciate some help.

Hi @Serguey! Welcome!

You can resize the plot pane while locator() is active (locator() is the base R function that Fragman uses for interactive point selection). If you both maximize and expand the plot pane, it might give you enough resolution to be more precise. Here's an example using the following code:

plot(
  ggplot2::diamonds$price,
  ggplot2::diamonds$depth,
  pch = 20,
  cex = 0.5,
  log = "x",
  ylim = c(55, 65)
)
my.panel <- locator(type='p', pch=1, cex=4, col='red')$x

com-resize

The locator points are still there even after the plot pane has been resized smaller again (red circles):

image

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.