Git Product home page Git Product logo

Comments (3)

hafen avatar hafen commented on July 29, 2024

Interesting. I cannot replicate, so it must be a data-specific thing.
I've tried passing all sorts of bad data to hexbin but can't get the same
error message. One thing you could do fairly quickly to help get to the
bottom of this is the following:

Open up the folder containing the trelliscope viewer files that are being
used (this is in the installed package directory) - assuming you are still
on a mac, the following will open up the enclosing folder in your finder:

system(paste("open ", file.path(system.file(package = "trelliscope"),
"/trelliscopeViewer/server/")))

Now open up the "_fns.R" file in your editor of choice, and insert a line
"browser()" around line 155 (right before the call to hexbin::hexbin().

Now back in R, run view() and replicate your steps that led to the error.
When you click "hexbin" in the bivariate filter window, it will now put
you in browser mode in your R console. Take a look
at cogDF[,xVar], cogDF[,yVar], shape, and xbin, and see if anything is
amiss and let me know.

Then make sure to remove the browser() line or you will keep getting stuck
in the future :).

On Wed, Sep 10, 2014 at 9:37 AM, Andy Halterman [email protected]
wrote:

I'm getting errors when I try to use the hexbin view in the bivariate
filter. The scatter view works fine, but when I switch to the hexbin view I
see "Error: NA/NaN/Inf in foreign function call (arg 1)" in Trelliscope. In
my R session, it put out

Error in hexbin:::hexbin(cogDF[, xVar], cogDF[, yVar], shape = shape, :
NA/NaN/Inf in foreign function call (arg 1)

The error persisted when I loaded the hexbin package in the global
environment.

Here's my sessionInfo():

R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grid parallel stats graphics grDevices utils datasets methods base

other attached packages:
[1] fastICA_1.2-0 hexbin_1.26.3 ggvis_0.3.0.9001 microbenchmark_1.3-0 mapproj_1.2-2
[6] maps_2.3-7 XML_3.98-1.1 ggmap_2.3 data.table_1.9.2 scagnostics_0.2-4
[11] rJava_0.9-6 base64enc_0.1-1 digest_0.6.4 jsonlite_0.9.11 shiny_0.10.0
[16] dplyr_0.2.0.99 lubridate_1.3.3 trelliscope_0.7.9.2 ggplot2_1.0.0 lattice_0.20-29
[21] datadr_0.7.3 Rcpp_0.11.2 devtools_1.5

loaded via a namespace (and not attached):
[1] assertthat_0.1 bitops_1.0-6 caTools_1.17 codetools_0.2-8 colorspace_1.2-4
[6] DBI_0.3.0 evaluate_0.5.5 formatR_0.10 gtable_0.1.2 htmltools_0.2.4
[11] httpuv_1.3.0 httr_0.3 knitr_1.6 labeling_0.2 magrittr_1.0.1
[16] markdown_0.7 MASS_7.3-33 memoise_0.2.1 munsell_0.4.2 plyr_1.8.1
[21] png_0.1-7 proto_0.3-10 R6_2.0 RCurl_1.95-4.1 reshape2_1.4
[26] RgoogleMaps_1.2.0.6 rjson_0.2.14 RJSONIO_1.2-0.2 scales_0.2.4 stringr_0.6.2
[31] testthat_0.8.1 tools_3.1.1 whisker_0.3-2 xtable_1.7-3


Reply to this email directly or view it on GitHub
#51.

from trelliscope.

ahalterman avatar ahalterman commented on July 29, 2024

I figured it out and it was my problem. One of my cognostics was returning infinity (number of rides in the morning / number of rides in the afternoon, when afternoon rides=0), and that's what was causing problems for hexbin. I think that's on the user to figure out, but the error message could be a little more informative. Not a big priority, though. Thanks!

from trelliscope.

hafen avatar hafen commented on July 29, 2024

Oh that's good to know. A warning would be nice about infinite values of cognostics. I'll also add something to the hexbin to ignore infinite values.

from trelliscope.

Related Issues (20)

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.