File: knitr.Rout.save

package info (click to toggle)
r-cran-data.table 1.12.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,084 kB
  • sloc: ansic: 12,667; sh: 13; makefile: 6
file content (70 lines) | stat: -rw-r--r-- 1,523 bytes parent folder | download | duplicates (5)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> if (suppressPackageStartupMessages(requireNamespace("knitr", quietly = TRUE))) {
+     require(knitr)
+     knit("knitr.Rmd", quiet=TRUE)
+     cat(readLines("knitr.md"), sep="\n")
+ } else {
+     cat(readLines("knitr.Rout.mock", warn = FALSE), sep="\n")
+ }
Loading required package: knitr
Loading required package: data.table

```r
require(data.table)              # print?
DT = data.table(x=1:3, y=4:6)    # no
DT                               # yes
```

```
##    x y
## 1: 1 4
## 2: 2 5
## 3: 3 6
```

```r
DT[, z := 7:9]                   # no
print(DT[, z := 10:12])          # yes
```

```
##    x y  z
## 1: 1 4 10
## 2: 2 5 11
## 3: 3 6 12
```

```r
if (1 < 2) DT[, a := 1L]         # no
DT                               # yes
```

```
##    x y  z a
## 1: 1 4 10 1
## 2: 2 5 11 1
## 3: 3 6 12 1
```
Some text.

> 
> 
> proc.time()
   user  system elapsed 
  3.116   0.128   3.257