I have a data frame, say:
df <- data.frame(a=1:10,b=runif(10))
I would like to be able to display the data frame for the user and select from them (click) a row, and get this row .
Something a bit like edit(df) , except that I want it a lot easier because I don't need editing functions. I just need to listen for the click event on one of the rows and get the index for that row (I donβt even need a specific cell!)
Does anyone know how I can do this? I would prefer to do this with an R or grid base (in order not to add a lot of packages) - maybe I can somehow draw a data frame on the grid graph with a scale defined from 1 to nrow(df) and use the grid.locator() function grid.locator() ?
It would be nice to avoid adding gui packages, but if I do, it should be cross-platform (linux / windows). gwidgets pretty nice (although they don't seem to have a click event that integrates perfectly with their gdf widget).
greetings.
r interactive dataframe
mathematical.coffee Feb 07 2018-12-12T00: 00Z
source share