Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does animint work on windows? #88

Open
talgalili opened this issue Jun 19, 2015 · 7 comments
Open

does animint work on windows? #88

talgalili opened this issue Jun 19, 2015 · 7 comments

Comments

@talgalili
Copy link

Here is the output:

> library(animint)
Loading required package: ggplot2
Find out what's changed in ggplot2 with
news(Version == "1.0.1", package = "ggplot2")
Loading required package: proto
> example(animint)

animnt> ## Make a Gapminder plot (aka Google motion chart), which is actually
animnt> ## just a scatterplot with size and color that moves over time.
animnt> library(animint)

animnt> data(WorldBank)

animnt> gapminder <-
animnt+   list(ts=ggplot()+
animnt+        make_tallrect(WorldBank, "year")+
animnt+        geom_line(aes(year, life.expectancy, group=country, color=region,
animnt+                      clickSelects=country),
animnt+                  data=WorldBank, size=4, alpha=3/5),
animnt+        time=list(variable="year",ms=3000),
animnt+        duration=list(year=1000),
animnt+        scatter=ggplot()+
animnt+        geom_point(aes(fertility.rate, life.expectancy, clickSelects=country,
animnt+                       showSelected=year, colour=region, size=population),
animnt+                   data=WorldBank)+
animnt+        geom_text(aes(fertility.rate, life.expectancy, label=country,
animnt+                      showSelected=country, showSelected2=year),
animnt+                  data=WorldBank)+
animnt+        make_text(WorldBank, 5, 80, "year")+
animnt+        scale_size_animint(pixel.range=c(2,20), breaks=10^(4:9)))

animnt> animint2dir(gapminder, "WorldBank-viz")
opening a web browser with a file:// URL; if the web page is blank, try running
if (!requireNamespace("servr")) install.packages("servr")
servr::httd("C:/Users/junior/Documents/WorldBank-viz")
Error in shell.exec(url) : 'WorldBank-viz/index.html' not found
@cpsievert
Copy link
Collaborator

Hi @talgalili, thanks for the report. The example works for me and here is my sessionInfo() (could you report yours as well?).

R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] animint_2015.06.16 proto_0.3-10       ggplot2_1.0.1      devtools_1.8.0    

loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6      servr_0.2.1      xml2_0.1.1       magrittr_1.5    
 [5] roxygen2_4.1.1   MASS_7.3-40      munsell_0.4.2    colorspace_1.2-6
 [9] lattice_0.20-31  stringr_1.0.0    plyr_1.8.3       tools_3.2.0     
[13] grid_3.2.0       gtable_0.1.2     git2r_0.10.1     rversions_1.0.1 
[17] digest_0.6.8     RJSONIO_1.3-0    reshape2_1.4.1   curl_0.8        
[21] mime_0.3         memoise_0.2.1    labeling_0.3     stringi_0.4-1   
[25] scales_0.2.5     httpuv_1.3.2     hexbin_1.27.0   

@kferris10 I have a feeling this may be due to file path issues on Windows. Would you mind running example(animint) on your machine?

@cpsievert
Copy link
Collaborator

@talgalili does this work for you?

library(animint)
animint2dir(list(p = qplot(1:10)))

@kferris10
Copy link
Collaborator

Everything seems to work fine for me.

devtools::session_info()
Session info ------------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.3 (2015-03-09)
 system   x86_64, mingw32             
 ui       RStudio (0.98.1083)         
 language (EN)                        
 collate  English_United States.1252  
 tz       America/Denver              

Packages ----------------------------------------------------------------------------
 package    * version    date       source                         
 animint      2015.06.16 2015-06-22 local                          
 colorspace * 1.2-4      2013-09-30 CRAN (R 3.1.1)                 
 devtools   * 1.7.0      2015-01-17 CRAN (R 3.1.2)                 
 digest     * 0.6.8      2014-12-31 CRAN (R 3.1.2)                 
 ggplot2      1.0.0.99   2015-03-14 Github (tdhock/ggplot2@aac38b6)
 gtable     * 0.1.2      2012-12-05 CRAN (R 3.1.1)                 
 MASS       * 7.3-39     2015-02-24 CRAN (R 3.1.3)                 
 munsell    * 0.4.2      2013-07-11 CRAN (R 3.1.1)                 
 plyr       * 1.8.1      2014-02-26 CRAN (R 3.1.1)                 
 proto        0.3-10     2012-12-22 CRAN (R 3.1.1)                 
 Rcpp       * 0.11.5     2015-03-06 CRAN (R 3.1.3)                 
 reshape2   * 1.4.1      2014-12-06 CRAN (R 3.1.2)                 
 rstudio    * 0.98.1083  2014-10-26 local                          
 rstudioapi * 0.2        2014-12-31 CRAN (R 3.1.2)                 
 scales     * 0.2.4      2014-04-22 CRAN (R 3.1.1)                 
 stringr    * 0.6.2      2012-12-06 CRAN (R 3.1.1)

@tdhock
Copy link
Owner

tdhock commented Jul 6, 2016

maybe this issue has something to do with windows? maybe we can test on windows via https://www.appveyor.com/ and maybe the fix will be via #50

@tdhock tdhock changed the title Example doesn't seem to work does animint work on windows? Jul 6, 2016
@kferris10
Copy link
Collaborator

@tdhock Just an FYI, I just double checked on my windows machine and everything still runs fine for me.

@faizan-khan-iit
Copy link
Collaborator

I was just going through some old issues related to #177 when I stumbled across this one. It seems like the problem is with the permissions that the R Gui has in Windows.

If I try to running this in the RGui(64 bit) :

library(animint)
animint2dir(list(p = qplot(1:10)))

everything works fine.

While this:

animint2dir(list(p = qplot(1:10)), "test_dir")

gives the following error:

`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
opening a web browser with a file:// URL; if the web page is blank, try running
if (!requireNamespace("servr")) install.packages("servr")
servr::httd("C:/Users/Faizan/Documents/test_dir")
Error in shell.exec(url) : 'test_dir/index.html' not found

Don't know why it can't find a directory it just created but running:

servr::httd("C:/Users/Faizan/Documents/test_dir")

after the above error works too.

RStudio seems fine with both so I don't think we ought to bother with fixing this.

@tdhock
Copy link
Owner

tdhock commented Mar 21, 2017

eventually it would be good to have appveyor test cases running on a windows vm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants