Code Monkey home page Code Monkey logo

irkernel's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

irkernel's Issues

Remove set_plot_options

…or deprecate and hide it from the docs.

R has a notion of the “default graphics device”, i.e. getOption('device'), which is either a string containing a function name or a function.

we could leverage this in two ways:

  1. use it with custom options:

    dev <- getOption('device')
    if (!is.function(dev)) {
        dev <- get(dev)
    }
    do.call(dev, as.list(options('jupyter.plot')))
  2. require the user to override the defaults by setting it to a function:

    #our initialization
    options(device = function(file.name, width = 7, height = 7,...) {
        png(file.name, width = width, height = height, ...)
    })
    
    …
    
    dev <- getOption('device')
    if (!is.function(dev)) {
        dev <- get(dev)
    }
    dev()

the only problem: we want to allow different mime types (PNG, JPG, SVG) for plots: if it’s a function, we can’t derive the type from the option.

Package caret doesn't run in the notebook

The following code runs ok in the command line but not in the notebook:

library(caret)
data(iris)
model <- train(Species~., data=iris, method="nb")

On the notebook it fails with:

Error in frameTypes(env): not a proper evaluation environment

Bioconductor annotation packages

After loading the Bioconductor org.Sc.sgd.db package (and its dependencies)

library(org.Sc.sgd.db)
as.list(org.Sc.sgdGENENAME)

works in a standard console but fails in IPython notebook with the error

Error in as.list.default(org.Sc.sgdGENENAME): no method for coercing this S4 class to a vector

In the standard console showMethods("as.list") returns

Function: as.list (package base)
x="AgiAnnDbMap"
x="AnnDbBimap"
  (inherited from: x="Bimap")
x="ANY"
x="Bimap"
x="CompressedAtomicList"
x="CompressedNormalIRangesList"
x="FlatBimap"
x="GoAnnDbBimap"
x="GOTermsAnnDbBimap"
x="Hits"
x="IpiAnnDbMap"
x="List"
x="Rle"
x="SimpleList"
x="Vector"

while in IPython it returns

Function: as.list (package base)
x="AgiAnnDbMap"
x="ANY"
x="Bimap"
x="CompressedAtomicList"
x="CompressedNormalIRangesList"
x="FlatBimap"
x="GoAnnDbBimap"
x="GOTermsAnnDbBimap"
x="Hits"
x="IpiAnnDbMap"
x="List"
x="Rle"
x="SimpleList"
x="Vector"

So it seems that for some reason the as.list method for the AnnDbBimap doesn't get inherited from Bimap in IPython.

IRkernel::installspec() is broken on windows

IRkernel::installspec()
Traceback (most recent call last):
File "C:\Anaconda\Scripts\ipython-script.py", line 5, in
sys.exit(start_ipython())
File "C:\Anaconda\lib\site-packages\IPython__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, _kwargs)
File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 574, in launch_instance
app.start()
File "C:\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 367, in start
return self.subapp.start()
File "C:\Anaconda\lib\site-packages\IPython\kernel\kernelspecapp.py", line 142, in start
return self.subapp.start()
File "C:\Anaconda\lib\site-packages\IPython\kernel\kernelspecapp.py", line 83, in start
replace=self.replace,
File "C:\Anaconda\lib\site-packages\IPython\kernel\kernelspec.py", line 195, in install_kernel_spec
shutil.copytree(source_dir, destination)
File "C:\Anaconda\lib\shutil.py", line 171, in copytree
names = os.listdir(src)
WindowsError: [Error 3] The system cannot find the path specified: u'C:/Program_.
'

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
c.Application.verbose_crash=True

Warning message:
running command 'ipython kernelspec install --replace --name ir --user C:/Program Files/R/R-3.1.3/library/IRkernel/kernelspec' had status 1

Error in eval(expr, envir, enclos): object not found

The following code (regression with instrumental variable)

library("lfe")
N <- 1e6
df <- data.frame(
  v1 =  sample(5, N, TRUE),                          # int in range [1,5]
  v2 =  sample(1e6, N, TRUE),                        # int in range [1,1e6]
  v3 =  sample(round(runif(100, max = 100), 4), N, TRUE) # numeric e.g. 23.5749
)
felm(v1 ~ 1 | 0 | (v2 ~ v3) , df)

outputs the error

Error in eval(expr, envir, enclos): object 'v2(fit)' not found

Would you know what is happening?

Problem on Windows with R objects

Hi I've installed IRkernel using bits and pieces I've found here and there, and I seem to have hit a snag. Before I describe the problem in detail, a little background. I run windows, which I know makes this harder. In particular, I built rzmq for windows using this guide:

http://blogs.msdn.com/b/gpalem/archive/2013/02/06/building-zeromq-for-r-rzmq-with-visual-studio-express-full.aspx

and got around another problem using this tip:

http://ihrke.github.io/jupyter.html

So far, things seem to work fine except for one issue: opening an iPython notebook and choosing an 'R' kernal, I run library("vars"), load some data (my_data), and then I run test <- ur.df(my_data, type = "trend", lags = 2). When I run test, I get, as expected

############################################################### 
# Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
############################################################### 

The value of the test statistic is: -7.9808 

However, when I run summary(test)

I get

Length  Class   Mode 
     1  ur.df     S4 

I should be getting a far more detailed result regarding the Dickey-Fuller unit root test. Digging a little further, I tried

class(test)

and got

[1] "ur.df"
attr(,"package")
[1] "urca"

and class(summary(test)) gives me

[1] "summaryDefault" "table"  

(I believe it should be in the class sumurca according to the documentation for the packages vars and urca)

Also, showMethods("summary") gives

Function: summary (package base)
object="ANY"
object="ca.jo"
object="ca.po"
object="cajo.test"
object="lm"
    (inherited from: object="ANY")
object="ur.df"
object="ur.ers"
object="ur.kpss"
object="ur.pp"
object="ur.sp"
object="ur.za"

When I try any of this in the command line R (or Rgui), it works as expected. Any idea what's going on? As you may have noticed, I'm no expert on any of this, but I've done a fair bit of googling, and I'm stumped. I also have no idea if this is unique to one package.

My setup is windows 7 (64-bit), R 3.1.2, iPython 3. I'm sure there is some other info you need to make a sensible recommendation and, given some guidance, I'm happy to provided it. Running sessionInfo(), I get

R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] vars_1.5-2        lmtest_0.9-33     urca_1.2-8        strucchange_1.5-0
[5] sandwich_2.3-2    zoo_1.7-11        MASS_7.3-39      

loaded via a namespace (and not attached):
 [1] base64_1.1      digest_0.6.8    evaluate_0.5.5  grid_3.1.2     
 [5] IRdisplay_0.1   IRkernel_0.2    jsonlite_0.9.14 lattice_0.20-30
 [9] rzmq_0.7.7      stringr_0.6.2   uuid_0.1-1     

Thank you for any thoughts.

Cheers,

DS

help on '{connection_file}'

I would like to switch from R -e to Rscript to run a bunch of code before calling IRkernel::main. Could you explain where the value of '{connection_file}' gets set when initiating ipyr? Is this inline template code that gets replaced by ipython? Or does IRkernel::main literally need to be called with this string?

Error getting data from zmq socket

The kernel dies as it's started repeatedly with an error like this, before eventually succeeding:

Error in rawToChar(receive.socket(socket, unserialize = FALSE)) : 
  embedded nul in string: '\0ȎpO'
Calls: <Anonymous> ... <Anonymous> -> handle_shell -> receive.multipart -> rawToChar
Execution halted

The string it displays is different each time - presumably it succeeds when the data doesn't have a null byte in.

toJSON error

Using install.packages results in an error from rjson

Error in toJSON(msg$content): unable to convert R type 3 to JSON

Note that the jsonlite package is an alternative to rjson which should be a bit more well behaved. Although I have no idea what R type 3 is.

screendump

Cannot install on Ubuntu 14.04.02

When running:

> library(devtools)
> install_github("takluyver/IRdisplay")
Downloading github repo takluyver/IRdisplay@master
Error in system(full, intern = quiet, ignore.stderr = quiet, ...) : 
  error in running command

Display printed output while code is still running

The current implementation buffers printed output in a textConnection() until the user code has finished executing, then sends a single stream message with all the text. So you see no output until the cell finishes.

If we can implement an object suitable to pass to sink, output can be displayed as it is printed.

IRkernel in Windows

2014-07-05 10:34:21.973 [NotebookApp] Kernel started: 4293024b-0a7a-4f74-91c7-fa
69678481da

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

Loading 'meta' package (version 3.6-0).
> IRkernel::main('C:\Users\outwen\.ipython\profile_default\security\kernel-42930
24b-0a7a-4f74-91c7-fa69678481da.json')
: "'C:\U"'\U'hex

2014-07-05 10:34:24.971 [NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 4293024b-0a7a-4f74-91c7-fa69678481da restarted

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

Loading 'meta' package (version 3.6-0).
> IRkernel::main('C:\Users\outwen\.ipython\profile_default\security\kernel-42930
24b-0a7a-4f74-91c7-fa69678481da.json')
: "'C:\U"'\U'hex

2014-07-05 10:34:27.987 [NotebookApp] KernelRestarter: restarting kernel (2/5)
WARNING:root:kernel 4293024b-0a7a-4f74-91c7-fa69678481da restarted

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)


Loading 'meta' package (version 3.6-0).
> IRkernel::main('C:\Users\outwen\.ipython\profile_default\security\kernel-42930
24b-0a7a-4f74-91c7-fa69678481da.json')
: "'C:\U"'\U'hex

2014-07-05 10:34:31.230 [NotebookApp] KernelRestarter: restarting kernel (3/5)
WARNING:root:kernel 4293024b-0a7a-4f74-91c7-fa69678481da restarted

R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

Loading 'meta' package (version 3.6-0).
> IRkernel::main('C:\Users\outwen\.ipython\profile_default\security\kernel-42930
24b-0a7a-4f74-91c7-fa69678481da.json')
: "'C:\U"'\U'hex

2014-07-05 10:34:34.438 [NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 4293024b-0a7a-4f74-91c7-fa69678481da restarted


> IRkernel::main('C:\Users\outwen\.ipython\profile_default\security\kernel-42930
24b-0a7a-4f74-91c7-fa69678481da.json')
: "'C:\U"'\U'hex

2014-07-05 10:34:44.163 [NotebookApp] WARNING | KernelRestarter: restart failed
2014-07-05 10:34:44.164 [NotebookApp] WARNING | Kernel 4293024b-0a7a-4f74-91c7-f
a69678481da died, removing from map.
ERROR:root:kernel 4293024b-0a7a-4f74-91c7-fa69678481da restarted failed!

Can IRkernel work in Windows? I just get this information when running it.
Thanks.

save.image doesn’t work

it doesn’t save everything. the docs say it’s the same as

save(list = ls(all.names = TRUE), file = ".RData", envir = .GlobalEnv)

something here goes wrong. is it .GlobalEnv or ls()?

Maybe rename repo to match that of IRdisplay

Right now there are two related repos, IR_kernel and IRdisplay, that are named with a slightly different convention. I know I am being completely OCD but it would make more sense to have them both with the underscore or without. Awesome work though, I am going to have a student start to use this ASAP.

Kernel dying on me

@takluyver @karthik I know this is still work in progress, but I couldn't resist trying it out. I followed the instructions in your README, but was greeted by the message that the kernel was restarting

Dead kernel
The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

Digging further, I see the following message on my console

Error: could not find function "poll.socket"
Execution halted
2014-03-05 09:43:27.892 [NotebookApp] WARNING | KernelRestarter: restart failed

I am using the version of the rzmq package on CRAN.

Any thoughts/pointers on how I might debug this.

Better help display

currently ?something outputs the raw help ANSI like _�D_�e_�s_�c_�r_�i_�p_�t_�i_�o_�n: (underscore backspace letter)

the Rd help should be converted using Rd2HTML, not Rd2TXT

Printed message

f <- function(){message("ok")}
f()

returns

ok # in R
simpleMessage in message("ok"): ok # in IPython

It can be cumbersome when the code inside message is long. For instance,

left_join(DT,DT1)

returns

Joining by: c("id", "v1") # R
simpleMessage in message("Joining by: ", capture.output(dput(by))): Joining by: c("id", "v1") #Ipython

Is there a simple way to simplify the Ipython output? Sorry - I have no idea how to change that (I could not even find the word "simple" in the repository).

Set some option so code can detect when it's running in IRkernel

From a discussion with @ramnathv.

Note that being in IRkernel does not necessarily imply that the code is running in the notebook - there are multiple frontends speaking the same protocol, and they may even be connected to the kernel at the same time. But we can reliably indicate that we're in the kernel.

a missing detail in installation procedure ?

Hi,

Looking more closely the error messages when installing on windows, I notice this one

> install_github('armstrtw/rzmq', pull=8, ref=NULL)
Erreur : Please install jsonlite package

it seems to suggest an added step in installation

install_github("jsonlite")
(or ?)
install_github("jeroenooms/jsonlite")

(apparently, it's IRKernel, that wants it )

importFrom(jsonlite,fromJSON)

so ...

install_github("jeroenooms/jsonlite")

.... and crash

`      -----------------------------------
* installing *source* package 'jsonlite' ...
Warning: running command 'sh ./configure.win' had status 127
ERROR: configuration failed for package 'jsonlite'
* removing 'C:/Users/famille/AppData/Local/Temp/Rtmp0kndNo/Rinstd2c505d1de/jsonl
ite'
      -----------------------------------
ERROR: package installation failed
Erreur : Command failed (1)

Just in case, I posted the question on jsonlite project
jeroen/jsonlite#28

No output visible

@karthik and @sckott, both using Macs, both had an issue where code appeared to run, but no output was visible. However, @ramnathv, also on a Mac, doesn't see it, and it works for a couple of people on Linux. Similar to an earlier, fixed issue (see discussion on #2).

No idea what could be causing this at the moment, but please comment with any ideas, debugging, or best of all, solutions.

Less verbose way to start IRKernel

Is there a way to create a profile or something else so that one can start the native R kernel using something like

$ ipython notebook --profile=R

R help documentation showing in IPython 2.2.0 but not IPython 3.0.0 dev

When I type
> help()
in IPython 2.2.0, the help documentation pops up from the lower part of the screen.
See the screenshot

screen shot 2014-09-24 at 5 54 58 pm

but there is no pop-up help message for IPython 3.0.0 dev.
I checked the terminal output and the help message also does not show up there.

There is similar buggy behavior for

contributors()

Windows Support

It would be nice to prepare a package for rzmq and irkernel, so that windows user can install them without setting up a mingw environment. Or upload them to cran :-)

I did get it to install the 64 bit version:

  • install.packages('RCurl') and library(devtools)
  • compile zeromg with a mingw by following this howto: http://zeromq.org/docs:windows-installations#toc2. I changed Makefile to remove perf and test from SUBDIRS to make compiling faster. This builds a 64bit libzmq.dll, but no 32 bit... I couldn't get it to compile using the rtools (setting the path to c:/rtools/bin and using C:\data\downloads\zeromq-4.0.5\zeromq-4.0.5>sh configure --prefix=C:/rtools/zeromq build_alias=x86-mingw32 "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32") and also not the 32bit version with the above mingw (passing in "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" to configure...)
  • clone armstrtw/rzmq and git submodule init/update to get inst\cppzmq\zmq.hpp. Also copied zmq.h from the compiled zeromq folder into that dir, because I didn't know how to find the usr/local/include folder in rtools...
  • copied libzmq.dll together with libgcc_s_sjlj-1.dll and libstdc++-6.dll into a lot of subfolders of C:\Rtools\gcc-4.6.3 (*\bin, *\lib; not sure which was the correct one in the end) until the following worked:
  • in rzmq folder: C:/PROGRA~1/R/R-31~1.2/bin/x64/R --vanilla CMD INSTALL %CD% --library="C:/portabel/Rlibs" --no-multiarch
  • install_github("takluyver/IRdisplay")
  • clone takluyver/IRkernel and in irkernel again: C:/PROGRA~1/R/R-31~1.2/bin/x64/R --vanilla CMD INSTALL %CD% --library="C:/portabel/Rlibs" --no-multiarch
  • run C:/PROGRA~1/R/R-31~1.2/bin/x64/R and then IRkernel::installspec()
  • running a v3 ipython notebook (from git yesterday) with a r kernel didn't work at first, as the R started by ipython notebook was 32bit and zmq wasn't installed in that version (see above...), so modified the .ipython\kernels\ir\kernel.json to read {"argv": ["R","--arch", "x64", "-e","IRkernel::main()","--args","{connection_file}"], (-> added "--arch", "x64",). I couldn't find a way to set this the default R, but that's probably just again missing google foo on my side :-( Next time I will simple install only 64bit R and not both.... [EDIT: it's probably enough to setx R_ARCH x64]

And yay: there was an R kernel and I can run R code in the notebook :-)

The above was brought to you by 6 hours poking around and a lot of trial and error in the middle of the night, numerous google searches and now not enough sleep but neverless a happy R kernel user :-) Thanks a lot for your work!

Troubleshooting Kernel Crashes

Is there a way to produce more output from kernel crashes. Executing code, and then Jupyter says the kernel has crashed with no other output. If we could understand some troubleshooting steps we could report back to the project on the issue.

Thanks!

CRAN?

Are you planning uploading this to CRAN?

If not, can you at least tag a release? I'm trying to build a conda package from this, and I'd like to have a stable release point other than just "master" to build off of.

R syntax highlighting

Syntax highlighting would be a nice enhancement.

By the way, why do "$" signs get red blocks around (in the current version)?

data.table

I'd like to use the function [ provided by data.table. However, I obtain

library(data.table)
DT <- data.table(id=1:100)
DT[1:10]
#> Error in `[.data.frame`(x, i): undefined columns selected

Maybe this is related to this SO question

Testing the new autocompletion

I tried to test the new autocompletion feature, but I wasn't able to obtain good results.

I (re)installed according to the README (maybe here is when I broke my installation):

# Need RCurl for install_github
install.packages('RCurl')
library(devtools)
install_github('armstrtw/rzmq')
install_github("takluyver/IRdisplay")
install_github("takluyver/IRkernel")

# Only if you have IPython 3 or above installed:
IRkernel::installspec()

And after opening a notebook, I got this:

screenshot from 2015-03-13 18 43 43

And some errors in the console:

 [I 18:43:34.578 NotebookApp] Adapting to protocol v4.0 for kernel 2da601ae-8408-4be6-b6e3-b61743ed876c
 [1] "Got unhandled msg_type:" "object_info_request"  

If a type ta or data. and hit Tab, then I get good results.

By the way, are we going to get tooltips as part of the implementation? Because right now Shift-Tab has no effect.

Change graph width

Hi,

It's really nice that IRkernel lets you display graphs inline. But is there a way to change the display width and height?

Parallelization broken

I'm running the NMF package in R and with parallelization and I found that It broken in the IRkernel with ta invalid value of 'seed' [in call to 'nextRNGStream'] error. I tested this in R and in the IPython Notebook with %%R magics and it works. I'm not sure but can this be a ZMQ/rzmq/pyzmq issue?

Package data.table not working properly

So, in R, if you define an object of data.table, subsetting is different from data.frame, so for example:

library(data.table)
DT <- data.table(x=rnorm(9), y=repc(("a", "b", "c"), each=3), z=rnorm(9))
DT[, c(2,3)] should return
2 3
but DT[,list(x,y)] can be used to access 2nd & 3rd columns. However, in ipython-Rkernel, DT behaves like data.frame rather than a data.table. Therefore, DT[, list(x,y)] gives an error
bug_in_data-table

Best way to run single lines

Is there a good way to run single lines without writing them in a cell? Existing guides use %qtconsole which seems specific to python

Output doesn't print immediately

I'm not sure what the root of the problem is but here is the minimal example I have:

for (i in 1:5) {
    cat('=')
    Sys.sleep(.2)
}

the above waits 1 second and then prints 5 equals signs. This is apposed to the following code:

cat('=')
Sys.sleep(.2)
cat('=')
Sys.sleep(.2)
cat('=')
Sys.sleep(.2)
cat('=')
Sys.sleep(.2)
cat('=')
Sys.sleep(.2)

that prints an equal sign every .2 seconds which is what I would expect from both examples. I played around with julia and python and they do what I expect in for loops.

FWIW I am running the ipython from master and R is version 3.1.2.

Stray Rplots.pdf back

I remember you had pushed a fix for this, but for some reason I am still getting stray Rplots.pdf files in my working directory. Any thoughts?

plots no longer working

I updated some packages on my ubuntu machine which previously was working, and now it broke. When trying to plot, the notebook displays

Error in base_display("image/png", b64data, metadata): unused argument (metadata)

Looking at IRdisplay it seems that the third argument of base_display was deprecated. But where is base_display called from?

S4 objects

Hi all,

when I try to create an S4 class in the notebook, e.g.,

setClass("circle", representation(r="numeric"))

it gives me the following error:

Error in assign(mname, def, where): cannot add bindings to a locked environment

This problem is easily fixed if one specifies the environment in the setClass function:

setClass("circle", representation(r="numeric"), where=.GlobalEnv)

But my question now is: why is the environment in IPython notebook not .GlobalEnv? Why is it locked?

I have a second (perhaps related?) problem after loading the Bioconductor org.Sc.sgd.db package (and its dependencies)

library(org.Sc.sgd.db)
as.list(org.Sc.sgdGENENAME)

works in a standard console but fails in IPython notebook with the error

Error in as.list.default(org.Sc.sgdGENENAME): no method for coercing this S4 class to a vector

I don't know what's going on since showMerhods("as.list") shows that there is a method for the S4 class AnnDbBimap.

Any help is appreciated.

Failed to install rzmq

System: OS X Yosemite, R: @3.1.2_0+accelerate+cairo+gfortran48+recommended+x11

> install_github('armstrtw/rzmq')
Downloading github repo armstrtw/rzmq@master
Installing rzmq
'/opt/local/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD  \
  INSTALL  \
  '/private/var/folders/rv/wstf88ns4g16sqgg62lsz_pw0000gn/T/Rtmp5NeM5l/devtools182a058697683/armstrtw-rzmq-320891d'  \
  --library='/Users/jiaweihe/Library/R/3.1/library' --install-tests 
 installing *source* package ‘rzmq’ ...
** libs
/usr/bin/clang++ -std=c++11 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/cppzmq -I/opt/local/include    -fPIC  -pipe -Os -arch x86_64 -stdlib=libc++ -c interface.cpp -o interface.o
interface.cpp:24:10: **fatal error: 'zmq.hpp' file not found**
#include <zmq.hpp>
         ^
1 error generated.
make: *** [interface.o] Error 1
ERROR: compilation failed for package ‘rzmq’
 removing ‘/Users/jiaweihe/Library/R/3.1/library/rzmq’

Error: Command failed (1)

add setting for using HTML print function

like shown here, ipython/jupyter has display hooks that can be registered with display formatters (e.g. png, html)

it would be nice if IRDisplay and IRKernel would work together so that

  1. we define a S3 or S4 generic (e.g. jupyterdisplay.default)
  2. IRDisplay defines it for some classes (e.g. jupyterdisplay.matrix)
  3. users can override it

script to convert R scripts to iPython Notebooks

Am curious if there is at any point any way/plan to convert R scripts to iPython Notebooks with the R kernel. Similar to how one can transform a .py file into a .ipynb file like so:

import IPython.nbformat.current as nbf
nb = nbf.read(open('test.py', 'r'), 'py')
nbf.write(nb, open('test.ipynb', 'w'), 'ipynb')

Is this farfetched? Seems like it would be a great way to increase adoption.

rzmq_issue

Hi,

I am on MacOs 10.9, I'm not able to install "rzmq",
I got this error message

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library’
* installing *source* package ‘rzmq’ ...
** package ‘rzmq’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c interface.cpp -o interface.o
interface.cpp:22:10: fatal error: 'zmq.hpp' file not found
#include <zmq.hpp>
         ^
1 error generated.
make: *** [interface.o] Error 1
ERROR: compilation failed for package ‘rzmq’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rzmq’

thanks

Difference of behaviour for "substitute" between R shell and Jupyter R notebook.

The command substitute does not behave in the same way in a normal R shell and in a Jupyter notebook.

For example:

x <- 5
substitute(y + x)

returns y + x in an R shell, but y + 5 in an R notebook.

This is probably due to the fact that the environment in an R notebook is not the R_GlobalEnv.

This could cause some issues when NSE is involved.

capturing STDOUT/STDERR

It seems as if STDOUT and STDERR are piped to the server console, see e.g. the R startup message, or output from install.packages. These streams often contain important information for the user. Is there some way to display these in the client?

screenshot

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.