Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Solution</strong></p> <p>Try this: <code>x &lt;- read.csv("C:/Users/surfcat/Desktop/2006_dissimilarity.csv", header=TRUE)</code></p> <p><strong>Explanation</strong></p> <p>R is not able to understand normal windows paths correctly because the <code>"\"</code> has special meaning - it is used as escape character to give following characters special meaning (<code>\n</code> for newline, <code>\t</code> for tab, <code>\r</code> for carriage return, ..., <a href="http://cran.r-project.org/doc/manuals/R-lang.html#Literal-constants" rel="noreferrer">have a look here</a> ). </p> <p>Because R does not know the sequence <code>\U</code> it complains. Just replace the <code>"\"</code> with <code>"/"</code> or use an additional <code>"\"</code> to escape the <code>"\"</code> from its special meaning and everything works smooth. </p> <p><strong>Alternative</strong></p> <p>On windows, I think the best thing to do to improve your workflow with windows specific paths in R is to use e.g. AutoHotkey which allows for custom hotkeys: </p> <ul> <li>define a Hotkey, e.g. <kbd>Cntr</kbd>-<kbd>Shift</kbd>-<kbd>V</kbd></li> <li>assigns it an procedure that replaces backslashes within your Clipboard with slaches ... </li> <li>when ever you want to copy paste a path into R you can use <kbd>Cntr</kbd>-<kbd>Shift</kbd>-<kbd>V</kbd> instead of <kbd>Cntr</kbd>-<kbd>V</kbd></li> <li>Et-voila</li> </ul> <p><strong>AutoHotkey Code Snippet</strong> <a href="http://www.autohotkey.com/" rel="noreferrer">(link to homepage)</a></p> <pre><code>^+v:: StringReplace, clipboard, clipboard, \, /, All SendInput, %clipboard% </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload