View() not supported in the Jupyter R kernel - r

I am using View() in Jupyter notebook, but it gives me errors:
Error in View(states): ‘View()’ not yet supported in the Jupyter R kernel. Is there anyway to fix this?

View() is really not supported in the Jupyter R kernel yet. You can track that at GitHub Issue #280 and see that in the source code of environment_shadow.r.
Instead, feel free to just use print(), head(), or maybe cat() according to your needs.

Related

Greek Characters in Julia Jupyter edition

I am using Julia.
I am trying to get some greek characters in Jupyter notebooks.
First I downloaded the latest version of Julia 1.6.2
For the jupyter connection I used anaconda, in julia repl i put ] add IJulia, and then I could chose the Julia kernel in Jupyter.
Then a friend suggested to download vs code (since we got a problem in the working directory with jupyter-anaconda)
In VS code we got no problem with working directories. And to work with notebooks we installed the Jupyter extension. It was working very well, but we got to this problem that we cannot get greek characters.
In Jupyter (anaconda) I could easily put greek characters, like this:
no package needed, nothing, just like that.
However in VSCode I cannot get that, nor "predictive text" or coding suggestions:
Any tips on how to solve this?
Like we are preferring VS Code and we know there's a way to get the greek characters on it, but we don't know how.
Any help is very welcomed.
Thanks in advance.
Check out the docs for the Julia extension in VS code here: https://code.visualstudio.com/docs/languages/julia. Per the comments above, make sure this is installed and you have the Julia kernel selected. You should then see the following:

How to handle R kernel tibble in Jupyter lab .ipynb file to display limited row results?

I am trying using R Kernel in jupyter lab and getting 1000's of rows or more displaying when results are tibble, this makes my browser crash sometimes.
How do i limit these so that it doesn't make my browser crash and works as smoothly as in Rstudio ?
I am using below versions:
jupyter lab: Version 2.2.6
R: R version 4.0.3
Not exactly a proper solution but a way around that I tried is to pipe the results to print and mention number of rows there: validaton_splits %>% print(n=1).

Coding r in Jupyter Lab (irkernel) - Using stringr package: The str_view() function fails

Can anyone use the str_view() function in Jupyter Lab?
Whenever the str_view() function is used, the output returns only a partial white screen and the function returns no values. No other stringr functions have any noticeable issues. This str_view() function does perform as expected in R studio.
Tried a work-around using that nifty Jupyter feature, "Create New View for Outputs" in attempts to output that partial failed-display But then things get really screwy. That New View window grows continuously larger, becomes unmanageable, becomes unstable, then crashes Jupyter.
library(dplyr)
library(stringr)
med <- as.matrix(read.csv("med.csv"))
med
str_length(med)
str_match(med, "Pill")
str_view(med, "Pill")
To the best of my knowledge, this is a standard install and configuration of python, Jupyter, and the Irkernel.
Therefore it would be nice to know if others are having a similar issue when using the str_view() function with the Irkernel, or whether it's the setup on this particular PC.
Screen print is below.
I think it's to do with the JupyterLab theme. Some things still don't display too well in JupyterLab's Dark theme. I've tried reproducing your issue below on JupyterLab 1.1.3:
JupyterLab

Atom and Hydrogen: Output and console

I'm a Python beginner and recently came across the Atom editor and the package Hydrogen, that implements the Jupyter notebook. I did so after realizing that running the notebook in Chrome consumed way too many resources and also seemed to be a bit slower.
However, the Atom editor and Hydrogen always output prints within a little frame in the code (see image). Unfortunately, it doesn't use the full window width. I also don't see any console/terminal for installing pip libraries.
Is there a way to have the output in a console below the code, just as in Jupyter, and to have a terminal?
this comes most certainly too late, but in case someone else searches for this:
hit control+shift+P / cmd+shift+P and type "toggle output area".

R syntax highlighting in Terminal

Can we get syntax highlighting for R in the Terminal?
I've finally found a library that meets my needs.
Now I'm much happier with my coding environment.
colorout is an R package that colorizes R output when running in a terminal emulator.The package cannot be on CRAN because it changes code already loaded by R and this is prohibited by the CRAN Repository Policy. The package replaces the functions that output results and messages to R Console, and this is necessary because we cannot colorize the output without replacing these functions. To install it, do the following in R:
install.packages("devtools")
devtools::install_github("jalvesaq/colorout")
library("colorout")
# do something
Use something like ess on emacs or RStudio for syntax highlighting for R instead of expecting it to work in the terminal.
Another option now would be to use radian instead of the default R prompt.
As hd1 indicated, this is not an R question. You're asking the OSX Terminal.app to do something it's not capable of. A quick look around Google (happy Zamboni birthday!) shows Vim syntax Highlighting for highlighting within vim , or https://superuser.com/questions/72057/terminal-emulator-with-custom-color-palette , but dunno if these will run under Darwin.
EDIT: I can't stay away from the search :-) . So check out these threads: https://superuser.com/questions/400360/syntax-highlighting-in-terminal-mac-os-x , http://forums.macrumors.com/showthread.php?t=412609 , and a recommendation to install zsh , https://apple.stackexchange.com/questions/12161/os-x-terminal-must-have-utilities

Resources