File: test-chunking.md

package info (click to toggle)
r-cran-reticulate 1.41.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,088 kB
  • sloc: cpp: 5,154; python: 620; sh: 13; makefile: 2
file content (53 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
    library(reticulate)

prose

    y = [2, 4, 6]

    # Comment about len
    print(len(y))

    ## 3

    # This comment about type should be attached to the code below.
    print(type(y))

    ## <class 'list'>

prose

    # Same Example with Collapsed Chunk
    y = [2, 4, 6]

    # Note the output of this command should available immediately below it (like with R).
    print(len(y))
    ## 3

    # Comment about type should be attached to the code below (like R). 
    # The output from the previous command should not be part of this
    print(type(y))
    ## <class 'list'>

    # Comparative Code for R
    x = c(2, 4, 6)

    # Output of length() is given just after the command (as expected)
    print(length(x))

    ## [1] 3

    # Comment about class is attached to the code below (as expected)
    print(class(x))

    ## [1] "numeric"

    # Comparative Code for R
    x = c(2, 4, 6)

    # Output of length() is given just after the command (as expected)
    print(length(x))
    ## [1] 3

    # Comment about class is attached to the code below (as expected)
    print(class(x))
    ## [1] "numeric"