##// END OF EJS Templates
Merge pull request #4209 from davclark/magic-doc-fixes...
Thomas Kluyver -
r12548:23b8d0b2 merge
parent child Browse files
Show More
@@ -4,9 +4,18 b''
4 4 Cython related magics
5 5 =====================
6 6
7 Magic command interface for interactive work with Cython
8
9 .. note::
10
11 The ``Cython`` package needs to be installed separately. It
12 can be obtained using ``easy_install`` or ``pip``.
13
7 14 Usage
8 15 =====
9 16
17 To enable the magics below, execute ``%load_ext cythonmagic``.
18
10 19 ``%%cython``
11 20
12 21 {CYTHON_DOC}
@@ -11,9 +11,13 b' Magics for interacting with Octave via oct2py.'
11 11 The ``oct2py`` module needs to be installed separately and
12 12 can be obtained using ``easy_install`` or ``pip``.
13 13
14 You will also need a working copy of GNU Octave.
15
14 16 Usage
15 17 =====
16 18
19 To enable the magics below, execute ``%load_ext octavemagic``.
20
17 21 ``%octave``
18 22
19 23 {OCTAVE_DOC}
@@ -6,9 +6,18 b' Rmagic'
6 6
7 7 Magic command interface for interactive work with R via rpy2
8 8
9 .. note::
10
11 The ``rpy2`` package needs to be installed separately. It
12 can be obtained using ``easy_install`` or ``pip``.
13
14 You will also need a working copy of R.
15
9 16 Usage
10 17 =====
11 18
19 To enable the magics below, execute ``%load_ext rmagic``.
20
12 21 ``%R``
13 22
14 23 {R_DOC}
@@ -425,12 +434,12 b' class RMagics(Magics):'
425 434 is printed if it would printed be when evaluating the same code
426 435 within a standard R REPL.
427 436
428 Nothing is returned to python by default in cell mode.
437 Nothing is returned to python by default in cell mode::
429 438
430 439 In [10]: %%R
431 440 ....: Y = c(2,4,3,9)
432 441 ....: summary(lm(Y~X))
433
442
434 443 Call:
435 444 lm(formula = Y ~ X)
436 445
@@ -447,9 +456,9 b' class RMagics(Magics):'
447 456 Multiple R-squared: 0.6993,Adjusted R-squared: 0.549
448 457 F-statistic: 4.651 on 1 and 2 DF, p-value: 0.1638
449 458
450 In the notebook, plots are published as the output of the cell.
459 In the notebook, plots are published as the output of the cell::
451 460
452 %R plot(X, Y)
461 %R plot(X, Y)
453 462
454 463 will create a scatter plot of X bs Y.
455 464
@@ -475,19 +484,19 b' class RMagics(Magics):'
475 484 * If the cell is not None, the magic returns None.
476 485
477 486 * If the cell evaluates as False, the resulting value is returned
478 unless the final line prints something to the console, in
479 which case None is returned.
487 unless the final line prints something to the console, in
488 which case None is returned.
480 489
481 490 * If the final line results in a NULL value when evaluated
482 by rpy2, then None is returned.
491 by rpy2, then None is returned.
483 492
484 493 * No attempt is made to convert the final value to a structured array.
485 Use the --dataframe flag or %Rget to push / return a structured array.
494 Use the --dataframe flag or %Rget to push / return a structured array.
486 495
487 496 * If the -n flag is present, there is no return value.
488 497
489 498 * A trailing ';' will also result in no return value as the last
490 value in the line is an empty string.
499 value in the line is an empty string.
491 500
492 501 The --dataframe argument will attempt to return structured arrays.
493 502 This is useful for dataframes with
General Comments 0
You need to be logged in to leave comments. Login now