File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ def r_version(self):
7878 "3.6" : "3.6.1-3bionic" ,
7979 "3.6.0" : "3.6.0-2bionic" ,
8080 "3.6.1" : "3.6.1-3bionic" ,
81+ "4.0" : "4.0.2-1.1804.0" ,
82+ "4.0.2" : "4.0.2-1.1804.0" ,
8183 }
8284 # the default if nothing is specified
8385 r_version = "3.6"
@@ -238,13 +240,17 @@ def get_build_scripts(self):
238240
239241 scripts = []
240242 # For R 3.4 we want to use the default Ubuntu package but otherwise
241- # we use the packages from a PPA
243+ # we use the packages from R's own repo
242244 if V (self .r_version ) >= V ("3.5" ):
245+ if V (self .r_version ) >= V ("4" ):
246+ vs = "40"
247+ else :
248+ vs = "35"
243249 scripts += [
244250 (
245251 "root" ,
246- r """
247- echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35 /" > /etc/apt/sources.list.d/r3.6 -ubuntu.list
252+ rf """
253+ echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran { vs } /" > /etc/apt/sources.list.d/r -ubuntu.list
248254 """ ,
249255 ),
250256 # Use port 80 to talk to the keyserver to increase the chances
Original file line number Diff line number Diff line change 1+ install.packages(" ggplot2" )
Original file line number Diff line number Diff line change 1+ r-4.0-2020-07-07
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env Rscript
2+ library(' ggplot2' )
3+
4+ print(version )
5+ if (version $ major != " 4" ) {
6+ quit(" yes" , 1 )
7+ }
You can’t perform that action at this time.
0 commit comments