Giter VIP home page Giter VIP logo

plumbr's Introduction

GGobi is an interactive, direct manipulation tool for visualizing high-dimensional data across linked plots. The GUI is built using Gtk+. It reads data in regular ASCII format and more richly using an XML format. Plugins for other formats are also available.

Build and install

./bootstrap
./configure
make
make install

plumbr's People

Contributors

hadley avatar lawremi avatar schloerke avatar yihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

korterling sa-lee

plumbr's Issues

subsetting a mutaframe can trigger new listeners

I have been wondering for a long while why the number of listeners keeps on increasing when the grand tour is running (qtour() in cranvas), and today I figured out the reason: simply subsetting a mutaframe can add new listeners on it. Here is an example:

library(plumbr)
library(qtbase)
library(objectSignals)
mf_listeners = function(x) listeners(plumbr:::changed(x))

mf = mutaframe(x = rnorm(5), y = rnorm(5))
add_listener(mf, function(i, j) {
  timestamp()
  str(mf_listeners(mf)) # print str() of mf listeners
})

# use a timer to change mf$x every 2 seconds
tm = qtimer(2000, function() {
  mf$x = rnorm(5)
})
tm$start()

## there was only one listener as expected, but the line below will add a new one

mf[1, ] # this will add a listener on mf

Because all plotting functions use [] frequently, the number of listeners can increase rapidly in a tour, which makes the tour slower and slower.

Is this new listener expected? I see it comes from [.mutaframe which uses filter_proxy().

Thanks!

Mutaframe with no arguments

> mutaframe()
Error in raw_bindings(mf, binders[!fun]) : 'data' must have names

Should produce a empty mutaframe

changing/adding multiple columns in a mutaframe

Each one of the following commands works with a data.frae, but not with a mutaframe - ... could we change this?

library(plumbr)
qmtcars <- qdata(mtcars)

qmtcars[,c("x","y")] <- data.frame(rnorm(n=nrow(mtcars)), rnorm(n=nrow(mtcars)))
# Error in which(data != new) : 
#   error in evaluating the argument 'x' in selecting a method for function 'which': Error: (list) object cannot be coerced to type 'double'
qmtcars[,c("x","y")] <- list(rnorm(n=nrow(mtcars)), rnorm(n=nrow(mtcars)))
# Error in which(data != new) : 
#   error in evaluating the argument 'x' in selecting a method for function 'which': Error: (list) object cannot be coerced to type 'double'
qmtcars[c("x","y")] <- list(rnorm(n=nrow(mtcars)), rnorm(n=nrow(mtcars)))
# Error in which(data != new) : 
#   error in evaluating the argument 'x' in selecting a method for function 'which': Error: (list) object cannot be coerced to type 'double'

adding a new column to a mutaframe

I think this might be a bug, but I do not know how to fix it:

y = mutaframe(data.frame(a=1))
add_listener(y,function(i,j) print(j))
y$a = 3  # get 'a'
y$b = 2  # Problem 1: get NULL here, should be 'b'
add_listener(y, function(i, j) print(y[j]))
y$c = 5 # Problem 2: error
y  # error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.