Skip to content

Commit e468e20

Browse files
committed
..
1 parent ef4aa63 commit e468e20

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vignettes/datatable-fread-and-fwrite.Rmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The `-v` option makes `grep` return all lines except those containing the string
5757

5858
Look at this [example](https://stackoverflow.com/questions/36256706/fread-together-with-grepl/36270543#36270543) for more detail.
5959

60-
On Windows we recommend [Cygwin](https://www.cygwin.com/) (run one .exe to install) which includes the command line tools such as grep. In March 2016, Microsoft [announced](https://www.hanselman.com/blog/developers-can-run-bash-shell-and-usermode-ubuntu-linux-binaries-on-windows-10) they will include these tools in Windows 10 natively. On Linux and macOS, these tools have always been included in the operating system. You can find many examples and tutorials about command line tools online. We recommend [Data Science at the Command Line](https://www.oreilly.com/library/view/data-science-at/9781491947845/).
60+
On Windows we recommend [Cygwin](https://www.cygwin.com/) (run one .exe to install) which includes the command line tools such as grep. In March 2016, Microsoft [announced](https://www.hanselman.com/blog/developers-can-run-bash-shell-and-usermode-ubuntu-linux-binaries-on-windows-10) they will include these tools in Windows 10 natively. On Linux and macOS, these tools have always been included in the operating system. You can find many examples and tutorials about command line tools online.
6161

6262
#### 1.1.1 **Reading directly from a text string**
6363

@@ -148,10 +148,11 @@ Because the large sample explicitly includes the very end of the file, critical
148148

149149
`fread()` doesn't directly support SQL `INSERT` scripts, but they can be processed via command-line tools. For example, given `insert_script.sql`:
150150

151-
```{SQL}
152-
INSERT INTO tbl VALUES (1, 'asd', 923123123, 'zx');
153-
INSERT INTO tbl VALUES (1, NULL, 923123123, 'zxz');
154-
INSERT INTO tbl VALUES (3, 'asd3', 923123123, NULL);
151+
```{r, eval=FALSE}
152+
# Example SQL insert statements:
153+
# INSERT INTO tbl VALUES (1, 'asd', 923123123, 'zx');
154+
# INSERT INTO tbl VALUES (1, NULL, 923123123, 'zxz');
155+
# INSERT INTO tbl VALUES (3, 'asd3', 923123123, NULL);
155156
```
156157

157158
Use this command in R [link](https://stackoverflow.com/questions/32026398/transform-sql-insert-script-into-csv-format):

0 commit comments

Comments
 (0)