You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 00-introduction.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -275,7 +275,7 @@ First, lets see what directory we are in. To do so, type the following command
275
275
into the script:
276
276
277
277
278
-
```r
278
+
```r
279
279
getwd()
280
280
```
281
281
@@ -299,7 +299,7 @@ not try to interpret as code. Edit your script to include a comment on the
299
299
purpose of commands you are learning, e.g.:
300
300
301
301
302
-
```r
302
+
```r
303
303
# this command shows the current working directory
304
304
getwd()
305
305
```
@@ -330,7 +330,7 @@ What if you weren't? You can set your home directory using the `setwd()`
330
330
command. Enter this command in your script, but *don't run* this yet.
331
331
332
332
333
-
```r
333
+
```r
334
334
# This sets the working directory
335
335
setwd()
336
336
```
@@ -343,7 +343,7 @@ advantage of RStudio's Tab-autocompletion method, to select `home`, `dcuser`,
343
343
and `dc_genomics_r` directory. The path in your script should look like this:
344
344
345
345
346
-
```r
346
+
```r
347
347
# This sets the working directory
348
348
setwd("/home/dcuser/dc_genomics_r")
349
349
```
@@ -423,12 +423,12 @@ function's behavior. For example the function `round()` will round a number
423
423
with a decimal:
424
424
425
425
426
-
```r
426
+
```r
427
427
# This will round a number to the nearest integer
428
428
round(3.14)
429
429
```
430
430
431
-
```output
431
+
```output
432
432
[1] 3
433
433
```
434
434
@@ -440,7 +440,7 @@ do this, but you may first need to read the help to find out how. To see the hel
440
440
name:
441
441
442
442
443
-
```r
443
+
```r
444
444
?round()
445
445
```
446
446
@@ -451,11 +451,11 @@ also see what arguments we can pass to this function to modify its behavior.
451
451
You can also see a function's argument using the `args()` function:
452
452
453
453
454
-
```r
454
+
```r
455
455
args(round)
456
456
```
457
457
458
-
```output
458
+
```output
459
459
function (x, digits = 0, ...)
460
460
NULL
461
461
```
@@ -469,11 +469,11 @@ a different value. We can explicitly set the digits parameter when we call the
469
469
function:
470
470
471
471
472
-
```r
472
+
```r
473
473
round(3.14159, digits=2)
474
474
```
475
475
476
-
```output
476
+
```output
477
477
[1] 3.14
478
478
```
479
479
@@ -483,18 +483,18 @@ when we used `args()`. In the case below that means that `x` is 3.14159 and
483
483
digits is 2.
484
484
485
485
486
-
```r
486
+
```r
487
487
round(3.14159, 2)
488
488
```
489
489
490
-
```output
490
+
```output
491
491
[1] 3.14
492
492
```
493
493
494
494
Finally, what if you are using `?` to get help for a function in a package not installed on your system, such as when you are running a script which has dependencies.
0 commit comments