Fix paths/slashes
This commit is contained in:
parent
5e015bf977
commit
ed42869cb4
|
@ -59,7 +59,7 @@ Paths and directories are a little complicated because there are two basic style
|
|||
|
||||
1. The most important difference is how you separate the components of the
|
||||
path. Mac and Linux uses slashes (e.g. `plots/diamonds.pdf`) and Windows
|
||||
uses backslashes (e.g. `plots\\diamonds.pdf`). R can work with either type
|
||||
uses backslashes (e.g. `plots\diamonds.pdf`). R can work with either type
|
||||
(no matter what platform you're currently using), but unfortunately,
|
||||
backslashes mean something special to R, and to get a single backslash
|
||||
in the path, you need to type two backslashes! That makes life frustrating,
|
||||
|
@ -67,12 +67,12 @@ Paths and directories are a little complicated because there are two basic style
|
|||
|
||||
1. Absolute paths (i.e. paths that point to the same place regardless of
|
||||
your working directory) look different. In Windows they start with a drive
|
||||
letter (e.g. "C:`) or two backslashes (e.g. `\\\servername`) and in
|
||||
Mac/Linux they start with a slash "/" (e.g. "/users/hadley"). You should
|
||||
letter (e.g. `C:`) or two backslashes (e.g. `\\servername`) and in
|
||||
Mac/Linux they start with a slash "/" (e.g. `/users/hadley`). You should
|
||||
__never__ use absolute paths in your scripts, because they hinder sharing:
|
||||
noone else will have exactly the same directory configuration as you.
|
||||
|
||||
1. The last minor difference is the place that "~" points to. "~" is a
|
||||
1. The last minor difference is the place that `~` points to. `~` is a
|
||||
convenient shortcut to your home directory. Windows doesn't really have
|
||||
the notion of a home directory, so it instead points to your documents
|
||||
directory.
|
||||
|
|
Loading…
Reference in New Issue