官术网_书友最值得收藏!

R dataset access

For this example, we will use the Iris dataset. Iris is built into R installations and is available directly. Let's just pull in the data, gather some simple statistics, and plot the data. This will show R accessing a dataset in Jupyter, using an R built-in package, as well as some available statistics (since we have R), and the interaction with R graphics.

The script we will use is as follows:

data(iris) 
summary(iris)
plot(iris)

If we enter this small script into a new R Notebook, we get an initial display that looks like the following:

I would expect the standard R statistical summary as output, and I know that the Iris plot is pretty interesting. We can see exactly what happened in the following screenshot:

The plot continues in the following screenshot, as it wouldn't fit into a single page:

A feature of Jupyter is to place larger plots, such as this, into a viewport that only shows a part of the image. I was able to drag the image out of the viewport window in its entirety for this shot. You can eliminate the viewport boundaries and have the entire output displayed by clicking in the viewport and dragging it.
主站蜘蛛池模板: 陈巴尔虎旗| 盖州市| 麟游县| 穆棱市| 紫金县| 宾川县| 马公市| 灵寿县| 任丘市| 襄汾县| 高邑县| 酒泉市| 湘阴县| 漠河县| 福贡县| 吉林市| 马龙县| 宿松县| 洛南县| 沂源县| 建瓯市| 民乐县| 南安市| 黔南| 鲁山县| 金平| 那坡县| 额济纳旗| 淅川县| 彭山县| 江城| 泰兴市| 三门峡市| 六盘水市| 朝阳区| 玛多县| 区。| 通渭县| 两当县| 关岭| 青龙|