2013-02-12 12 views
6

Ich möchte Standard-Editor in RStudio (Windows 7) auf Notizblock ++ ändern.Ändern Standard-Editor in RStudio auf Notizblock ++

Ich weiß, dass ich

options(editor = "notepad") 

und führen beispielsweise dazu verwenden sollte:

mean <- edit(mean) 

aber wenn ich Notizblock Typ ++ ich diesen Fehler

options(editor = "notepad++") 
mean <- edit(mean) 
Error in edit(name, file, title, editor) : 
    unable to run editor 'notepad++' 

ich Windows I kann Notepad ++ in der Konsole ausführen, indem Sie "start notepad ++" eingeben.

Ich wäre sehr dankbar für Hilfe!

Hier ist meine Session Info:

> sessionInfo() 
R version 2.15.2 (2012-10-26) 
Platform: x86_64-w64-mingw32/x64 (64-bit) 

locale: 
[1] LC_COLLATE=Polish_Poland.1250 LC_CTYPE=Polish_Poland.1250 LC_MONETARY=Polish_Poland.1250 
[4] LC_NUMERIC=C     LC_TIME=Polish_Poland.1250  

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

loaded via a namespace (and not attached): 
[1] tools_2.15.2 
+0

Und hast du 'Optionen (Editor =" start notepad ++ ")' '? – juba

+1

Ja, ich bekomme den gleichen Fehler. – Maciej

Antwort

10

Ok, es ist wirklich einfach war:

options(editor = "C:/Program Files (x86)/Notepad++/notepad++.exe") 

Sorry für das Problem.

+4

Für diejenigen, die zu Hause spielen, ist das Problem, dass Notepad ++ nicht im PATH ist (während Notepad ist). –

1

Für alle anderen dazu suchen, können Sie die Einstellung dauerhaft für alle, indem Sie auf ‘R_HOME/etc/Rprofile.site’ R Workspaces ändern, wo R_HOME das Verzeichnis ist es installiert ist. Nach dem Auffinden der Rprofile.site Datei, öffnen Sie sie in Notepad ++ und Folgendes ändern:

# options(papersize="a4") 
options(editor="notepad") 
# options(pager="internal") 

zu:

# options(papersize="a4") 
options(editor="C://Program Files (x86)//Notepad++//notepad++.exe") 
# options(pager="internal") 

Speichern Sie die Datei und Sie sind fertig.