-
Notifications
You must be signed in to change notification settings - Fork 3
/
R on Visual Studio Code.txt
93 lines (56 loc) · 2.2 KB
/
R on Visual Studio Code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Installing R on Visual Studio code (PMIM502)
1) Install R
https://cran.r-project.org/bin/linux/
https://cran.r-project.org/bin/macosx/
https://cran.r-project.org/bin/windows/
2)Install Python
https://www.python.org/downloads/
3) Install radian (in visual code terminal from this point onwards)
# install released version
pip install -U radian
# to run radian
radian
4) Enable Bracketpaste in Visual studio code (search r.bracketedPaste in visual code settings)
To make VSCode better work with radian, we should turn on r.bracketedPaste setting in VSCode.
5) Install VSCode Extensions
https://marketplace.visualstudio.com/items?itemName=Ikuyadeu.r
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r-lsp
6) Install Language Servers
https://github.com/r-windows/docs
install.packages("languageserversetup")
languageserversetup::languageserver_add_to_rprofile()
might need to change backslashes to double backslashes in Rprofile (in documents folder)
languageserversetup::languageserver_install()
7) Install PMIM502 packages
install.packages("gapminder")
library(gapminder)
install.packages("dplyr")
library(dplyr)
install.packages("ggplot2")
library(ggplot2)
install.packages("Cairo")
library(Cairo)
install.packages("plotly")
library(plotly)
install.packages("scales")
library(scales)
install.packages("extrafont")
library(extrafont)
install.packages("ggthemes")
## dont know if you need this one
install.packages("tidyverse")
8) Open the gapminder.R file (From canvas Taught Week)
9) GitHub for visual studio code
https://code.visualstudio.com/docs/editor/github
10) PostGREs
https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
10a) If pgadmin sticks on loading:
Do the following steps to resolve this:
Open your registry editor.
Change the value of HKEY_CLASSES_ROOT\.js\Content Type from text/plain to text/javascript.
Restart the pgadmin server. You can do this by ending the pgadmin background task from the task manager.
Tip:
Preview data frame
highlight dataframe and press F1
type R: Preview Dataframe