Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

open (not run) and edit a R script from Rstudio console

Tags:

r

rstudio

Is it possible to open (not run using source) a R script for editing from the console of R studio or R command line

like image 764
Naran Avatar asked Mar 18 '15 15:03

Naran


2 Answers

You can open a file for editing with edit, e.g.,

edit(file = "test.R")

See help("edit") for more information, in particular regarding different editors.

like image 151
Roland Avatar answered Sep 27 '22 23:09

Roland


This is a nice command to edit an r script:

file.edit('foo.R')
like image 34
Chirayu Chamoli Avatar answered Sep 28 '22 01:09

Chirayu Chamoli